grouping native node imports

This commit is contained in:
RealBeepMcJeep 2023-08-29 14:20:37 -07:00
parent fc59b20f36
commit c0b1ea5f4c
1 changed files with 6 additions and 11 deletions

View File

@ -2,8 +2,13 @@
// native node modules // native node modules
const child_process = require('child_process') const child_process = require('child_process')
const crypto = require('crypto');
const fs = require('fs'); const fs = require('fs');
const http = require("http");
const https = require('https');
const path = require('path'); const path = require('path');
const readline = require('readline');
const { TextEncoder, TextDecoder } = require('util');
// cli/fs related library imports // cli/fs related library imports
const yargs = require('yargs/yargs'); const yargs = require('yargs/yargs');
@ -79,31 +84,21 @@ const directory = process.pkg ? path.dirname(process.execPath) : __dirname;
console.log(process.pkg ? 'Running from binary' : 'Running from source'); console.log(process.pkg ? 'Running from binary' : 'Running from source');
process.chdir(directory); process.chdir(directory);
const app = express(); const app = express();
app.use(compression()); app.use(compression());
app.use(responseTime()); app.use(responseTime());
const readline = require('readline');
const open = require('open'); const open = require('open');
const http = require("http");
const https = require('https');
const basicAuthMiddleware = require('./src/middleware/basicAuthMiddleware'); const basicAuthMiddleware = require('./src/middleware/basicAuthMiddleware');
const contentManager = require('./src/content-manager'); const contentManager = require('./src/content-manager');
const cookieParser = require('cookie-parser'); const cookieParser = require('cookie-parser');
const crypto = require('crypto');
const ipaddr = require('ipaddr.js'); const ipaddr = require('ipaddr.js');
const json5 = require('json5'); const json5 = require('json5');
const DeviceDetector = require("device-detector-js"); const DeviceDetector = require("device-detector-js");
const { TextEncoder, TextDecoder } = require('util');
const utf8Encode = new TextEncoder(); const utf8Encode = new TextEncoder();
const commandExistsSync = require('command-exists').sync; const commandExistsSync = require('command-exists').sync;