Repository navigation
Add opt-out config for dev dependency exclusion - #3877
Merged
Merged
Conversation
pmuens
force-pushed
the
opt-out-for-dev-dependency-exclusion
branch
from
June 30, 2017 07:26
deb972d to
34595e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What did you implement:
Refs #3827
Refs #3874
Refs #3869
Add the
excludeDevDependenciesconfig variable to theglobalpackage level.This config variable defaults to
true.How did you implement it:
Added the config variable and added a check in the
excludeDevDependencies()function.How can we verify it:
Use the following
package.jsonfile:{ "name": "test-service", "version": "1.0.0", "main": "handler.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "node-fetch": "^1.7.1" }, "devDependencies": { "ava": "^0.19.1", "babel-cli": "^6.24.1", "babel-core": "^6.25.0", "babel-preset-es2015": "^6.24.1", "browserify": "^14.4.0", "express": "^4.15.3", "jest": "^20.0.4", "mocha": "^3.4.2", "react": "^15.6.1", "react-native": "^0.45.1", "webpack": "^3.0.0" }, "description": "" }Install the dependencies via
npm install.Run
serverless package. After that runls -lh <path-to-service-zip>. The size should be pretty small.Add the following to your
serverless.ymlfile:Run
serverless package. After that runls -lh <path-to-service-zip>. The size should be pretty big.Todos:
Is this ready for review?: YES
Is it a breaking change?: NO