Skip to content

Commit 85cbe7e

Browse files
Update script
1 parent 3f7fa9d commit 85cbe7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"prebuild": "del /q dist",
9-
"create-package": "node -e \"require('fs').writeFileSync('temp/package.json', JSON.stringify({ name: 'temp', version: '1.0.0', dependencies: {} }))\"",
10-
"build:index": "esbuild src/index.ts --banner:js=\"/* global handler */\" --bundle --minify --sourcemap --platform=node --target=es2020 --outdir=dist",
11-
"build:src": "esbuild \"src/**/*.ts\" --bundle --minify --sourcemap --platform=node --target=es2020 --outdir=dist",
12-
"build:dependencies": "mkdir temp && node -e \"const fs = require('fs'); const pkg = require('./package.json'); fs.writeFileSync('temp/package.json', JSON.stringify({ name: 'temp', version: '1.0.0', dependencies: pkg.dependencies }, null, 2));\" && cd temp && npm install --omit=dev",
9+
"create-package": "node -e \"require('fs').writeFileSync('temp-dependencies-layer/package.json', JSON.stringify({ name: 'temp-dependencies-layer', version: '1.0.0', dependencies: {} }))\"",
10+
"build:index": "esbuild src/index.ts --banner:js=\"/* global handler */\" --bundle --minify --sourcemap --platform=node --target=es2020 --outdir=temp-index",
11+
"build:src": "esbuild \"src/**/*.ts\" --bundle --minify --sourcemap --platform=node --target=es2020 --outdir=temp-index",
12+
"build:dependencies": "mkdir temp-dependencies-layer && node -e \"const fs = require('fs'); const pkg = require('./package.json'); fs.writeFileSync('temp-dependencies-layer/package.json', JSON.stringify({ name: 'temp-dependencies-layer', version: '1.0.0', dependencies: pkg.dependencies }, null, 2));\" && cd temp-dependencies-layer && npm install --omit=dev",
1313
"build": "npm run build:index && npm run build:src && npm run build:dependencies",
14-
"postbuild": "cd dist && 7z a -tzip index.zip * && cd ../temp && 7z a -tzip ../dist/dependencies-layer.zip node_modules/* && cd .. && rmdir /s /q temp"
14+
"postbuild": "cd temp-index && 7z a -tzip ../dist/index.zip * && cd ../temp-dependencies-layer && 7z a ../dist/dependencies-layer.zip node_modules/* && cd .. && rmdir /s /q temp-index temp-dependencies-layer"
1515
},
1616
"repository": {
1717
"type": "git",

0 commit comments

Comments
 (0)