Skip to content

Commit

Permalink
Add scripts create-zip & create-zip-without-aws-libs
Browse files Browse the repository at this point in the history
  • Loading branch information
sagidM committed Apr 1, 2023
1 parent e38850f commit 86132ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/node_modules
package-lock.json
*.zip
.DS_Store
/out
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@
"@aws-sdk/client-s3": "^3.304.0",
"@aws-sdk/lib-storage": "^3.304.0"
},
"scripts": {
"_prepare": "mkdir -p out && rm -rf out/node_modules && cp {package.json,index.js} out",
"create-zip": "npm run _prepare && cd out && npm i --arch=x64 --platform=linux && zip -rq s3-resizer_nodejs_18.zip index.js node_modules package.json && rm -rf package*.json index.js node_modules",
"create-zip-without-aws-libs": "npm run _prepare && cd out && npm i --arch=x64 --platform=linux -only=prod && zip -rq s3-resizer_nodejs_18_without_aws-sdk.zip index.js node_modules package.json && rm -rf package*.json index.js node_modules"
},
"type": "module"
}

0 comments on commit 86132ff

Please sign in to comment.