fix(striker-ui-api): compile API to single script

main
Tsu-ba-me 3 years ago
parent 86b838cdcb
commit a951ac3892
  1. 6
      striker-ui-api/.gitignore
  2. 325
      striker-ui-api/out/index.js
  3. 28
      striker-ui-api/package-lock.json
  4. 11
      striker-ui-api/package.json

@ -1,6 +1,2 @@
# dependencies # dependencies
/node_modules node_modules
# production
/striker-ui-api
!/striker-ui-api.tar.xz

File diff suppressed because one or more lines are too long

@ -13,6 +13,7 @@
"multer": "^1.4.4" "multer": "^1.4.4"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "^0.33.3",
"pkg": "^5.5.1", "pkg": "^5.5.1",
"prettier": "^2.5.0" "prettier": "^2.5.0"
} }
@ -86,6 +87,15 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/@vercel/ncc": {
"version": "0.33.3",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.3.tgz",
"integrity": "sha512-JGZ11QV+/ZcfudW2Cz2JVp54/pJNXbsuWRgSh2ZmmZdQBKXqBtIGrwI1Wyx8nlbzAiEFe7FHi4K1zX4//jxTnQ==",
"dev": true,
"bin": {
"ncc": "dist/ncc/cli.js"
}
},
"node_modules/accepts": { "node_modules/accepts": {
"version": "1.3.7", "version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@ -970,9 +980,9 @@
} }
}, },
"node_modules/graceful-fs": { "node_modules/graceful-fs": {
"version": "4.2.8", "version": "4.2.9",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
"dev": true "dev": true
}, },
"node_modules/has": { "node_modules/has": {
@ -2360,6 +2370,12 @@
"fastq": "^1.6.0" "fastq": "^1.6.0"
} }
}, },
"@vercel/ncc": {
"version": "0.33.3",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.3.tgz",
"integrity": "sha512-JGZ11QV+/ZcfudW2Cz2JVp54/pJNXbsuWRgSh2ZmmZdQBKXqBtIGrwI1Wyx8nlbzAiEFe7FHi4K1zX4//jxTnQ==",
"dev": true
},
"accepts": { "accepts": {
"version": "1.3.7", "version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@ -3055,9 +3071,9 @@
} }
}, },
"graceful-fs": { "graceful-fs": {
"version": "4.2.8", "version": "4.2.9",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
"dev": true "dev": true
}, },
"has": { "has": {

@ -3,13 +3,11 @@
"version": "0.1.0", "version": "0.1.0",
"description": "API for striker-ui", "description": "API for striker-ui",
"scripts": { "scripts": {
"build": "pkg --compress GZip --output striker-ui-api --targets node14-linux index.js", "build": "ncc build --out out --minify --target es2015",
"build:clean": "rm -f striker-ui-api", "build:clean": "rm -rf out",
"compress": "[[ -e striker-ui-api ]] && XZ_OPT='--verbose -9e' tar --create --verbose --xz --file striker-ui-api.tar.xz striker-ui-api || echo 'Cannot find output of build.' && exit 1",
"decompress": "tar --extract --verbose --file striker-ui-api.tar.xz",
"dev": "node index.js", "dev": "node index.js",
"rebuild": "npm run clean && npm run build", "rebuild": "npm run build:clean && npm run build",
"start": "npm run build && ./striker-ui-api", "start": "npm run rebuild && node out/index.js",
"style:fix": "prettier --write *" "style:fix": "prettier --write *"
}, },
"dependencies": { "dependencies": {
@ -18,6 +16,7 @@
"multer": "^1.4.4" "multer": "^1.4.4"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "^0.33.3",
"pkg": "^5.5.1", "pkg": "^5.5.1",
"prettier": "^2.5.0" "prettier": "^2.5.0"
} }

Loading…
Cancel
Save