Closed afn closed 8 years ago
Make the ember:install task smarter, and have it be a no-op if package.json / bower.json hasn't changed since the task was last run.
How could we achieve this?
I would prefer to depend on npm install
being smart about when to no-op.
Would it be possible to investigate this on the npm side?
The responsibility of handling npm
's dirty-checking and cache expiration feel outside the scope of ember-cli-rails
.
It would be nice if npm
were smart enough to no-op on subsequent npm install
calls.
I'm closing this for now, but if you have an idea of how to implement this, we'd love to review a pull request!
When deploying to heroku,
npm install
is run twice: once by the NodeJS buildpack, and again during asset precompilation. The issue occurs in our build environment (on CircleCI) as well, since we run bothnpm install
andrake assets:precompile
as part of our build setup.A couple of possible approaches to take:
ember:compile
onember:install
to be disabled by an environment variable. This would be the simplest approach, but it would require users to remember to set this variable in their Heroku environment and (if it's set up like ours) their CI environment.ember:install
task smarter, and have it be a no-op ifpackage.json
/bower.json
hasn't changed since the task was last run.I'm happy to do a PR but I'd like to hear your thoughts on the best approach to take here.
411 is closely related, but not entirely the same issue.
Thanks!