Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have the --no-optional flag? #29

Open
javefang opened this issue May 21, 2015 · 2 comments
Open

Can we have the --no-optional flag? #29

javefang opened this issue May 21, 2015 · 2 comments
Assignees

Comments

@javefang
Copy link

Can we add a --no-optional so slc build will install dependencies with npm install --no-optional? Our company's policy doesn't allow internet access on the build server, which slows down the build a lot when it tries to install an optional dependency sl-blip. Thanks!

@rmg
Copy link
Member

rmg commented May 21, 2015

You might be able to accomplish this by setting an environment variable, since all npm config and CLI flags basically use them. Would probably be something like npm_config_skip_optional=1 slc build I think.

Also, this would be an great feature to submit a pull request for if anyone is so inclined, since it should be pretty straightforward.

@javefang
Copy link
Author

Thanks @rmg, I figured out that this can be achieved with npm_config_optional=0 slc build, I can live with it for now. But is happy to look into providing a PR should more developer request it.

In the end this is only needed when an npm package is not hosted on the npm registry (e.g. git), the sl-blip optional dependency is an example, seems like people are complaining about it already. If that would be solved then we won't need this feature anymore.

strongloop/loopback#1079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants