Skip to content

Instantly share code, notes, and snippets.

@oneEyedSunday
Created November 16, 2019 01:49
Show Gist options
  • Save oneEyedSunday/e7293273f5c9601c758502b865574ea7 to your computer and use it in GitHub Desktop.
Save oneEyedSunday/e7293273f5c9601c758502b865574ea7 to your computer and use it in GitHub Desktop.
Reduce lambda size by stripping dev dependencies
{
"scripts": {
"lint": "node node_modules/eslint/bin/eslint.js src --config ./.eslintrc.json",
"lint:fix": "npm run lint -- --fix",
"pre-package": "npm run lint && mv node_modules full_node_modules && npm prune --production",
"package": "npm run pre-package && npm run pack-publish && npm run post-package",
"post-package": "rm -rf node_modules && mv full_node_modules node_modules",
"pack-publish": "rm code.zip && zip -r code.zip src package.json node_modules",
"test": "npm run test"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment