NodeJS Cartridge Should Only Pull Production Modules#5628
NodeJS Cartridge Should Only Pull Production Modules#5628kevinconaway wants to merge 1 commit intoopenshift:masterfrom kevinconaway:issue_5627
Conversation
…n devDependencies
|
Would it make sense to allow this to be user configurable? You could check for the existence of either a marker file or an environment variable to determine whether or not to add the --production flag. |
|
Not in my opinion. The devDependencies are used for build/test, not actually running the app. That said, having it configurable would open up possibilities that I'm not aware of. |
|
I think we want this to be configurable. We particularly don't want to risk breaking existing user applications who might be inadvertently expecting dev dependencies to be installed. I've opened a trello card to track this feature request: but if you want to modify this PR to based the --production flag on an env variable (with a default to not pass --production, for backwards compatibility), that'd be great! |
|
Thanks Ben, will do. Is this something that the end user would set with rhc set-env? I'm not familiar with how the app author would expose an envvar to the cartridge. |
|
yeah, rhc set-env, or passing -e on app create to set it from the start. they could also create a pre-build hook that set it. |
|
Dup of #5215 |
Issue #5627