forked from svrjs/svrjs
build: move utils/ directory to src/extraScripts/
This commit is contained in:
parent
efdf6f1551
commit
147c7c5d03
6 changed files with 5 additions and 5 deletions
|
@ -187,19 +187,19 @@ esbuild
|
|||
],
|
||||
})
|
||||
.then(() => {
|
||||
const utilFilesAndDirectories = fs.existsSync(__dirname + "/utils")
|
||||
? fs.readdirSync(__dirname + "/utils")
|
||||
const utilFilesAndDirectories = fs.existsSync(__dirname + "/src/extraScripts")
|
||||
? fs.readdirSync(__dirname + "/src/extraScripts")
|
||||
: [];
|
||||
const utilFiles = [];
|
||||
utilFilesAndDirectories.forEach((entry) => {
|
||||
if (fs.statSync(__dirname + "/utils/" + entry).isFile())
|
||||
if (fs.statSync(__dirname + "/src/extraScripts/" + entry).isFile())
|
||||
utilFiles.push(entry);
|
||||
});
|
||||
|
||||
// Transpile utilities using esbuild
|
||||
esbuild
|
||||
.build({
|
||||
entryPoints: utilFiles.map((filename) => "utils/" + filename),
|
||||
entryPoints: utilFiles.map((filename) => "src/extraScripts/" + filename),
|
||||
bundle: true,
|
||||
outdir: "dist",
|
||||
platform: "node",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"build": "node esbuild.config.js",
|
||||
"cz": "cz",
|
||||
"dev": "npm run build && npm run start",
|
||||
"lint": "eslint --no-error-on-unmatched-pattern src/**/*.js src/*.js tests/**/*.test.js tests/**/*.js tests/*.test.js tests/*.js utils/**/*.js utils/*.js",
|
||||
"lint": "eslint --no-error-on-unmatched-pattern src/**/*.js src/*.js tests/**/*.test.js tests/**/*.js tests/*.test.js tests/*.js",
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"prepare": "husky",
|
||||
"start": "node dist/svr.js",
|
||||
|
|
Reference in a new issue