aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks/yarn.rake
Commit message (Collapse)AuthorAgeFilesLines
* Respect Rails.env when running `rails yarn:install`Chris Bandy2019-01-041-2/+1
| | | | | When no environment variables are set the expectation is that we are in development.
* Run yarn install relative to Rails.rootKevin Dew2018-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may not always have binstubs relative to the directory we are running the rake task from. The particular case for this is with a mountable Rails engine and dummy app that is created to test it. This sets all the tasks up to run under an `app` namespace in railties/lib/rails/tasks/engine.rake This change resolves a problem whereby running `app:yarn:install` would have no effect as it would try to run in the plugins bin directory rather than the test/dummy/bin. This also means that it installs from test/dummy/package.json and into test/dummy/node_modules which is behaviour consistent with a normal Rails app. On a rails engine: ``` ➜ tmp rails plugin new rails-plugin --mountable ➜ tmp cd rails-plugin ``` Before this change: ``` ➜ rails-plugin rake app:yarn:install ➜ rails-plugin ``` After this change: ``` ➜ rails-plugin rake app:yarn:install yarn install v1.9.4 info No lockfile found. [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 📃 Building fresh packages... ✨ Done in 0.07s. ``` When this change is ran against a normal rails install there is not a behavioural change: ``` ➜ tmp rails new full-app ➜ tmp cd full-app ➜ full-app git:(master) ✗ rake yarn:install yarn install v1.9.4 info No lockfile found. [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 📃 Building fresh packages... ✨ Done in 0.09s. ```
* Respect NODE_ENV when running `rails yarn:install`printercu2018-04-231-1/+7
| | | | | | `yarn install --prod` removes dev deps, so it's impossible to run `assets:precompile` with dev npm dependencies. This change makes rake task pass NODE_ENV to yarn when explicitly set.
* Fix "--frozen-lockfile" argument used in yarn install rake taskGuillermo Iguaran2018-03-291-1/+1
| | | --frozen-lockfile is the right name of the argument
* Raise an error when lockfile diff is generatedMax Schwenk2018-03-131-1/+1
| | | https://yarnpkg.com/en/docs/cli/install#toc-yarn-install-frozen-lockfile
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Make `rails yarn:install` ignore dev dependenciesprintercu2017-07-191-1/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Fix rubocop violationsRafael Mendonça França2017-02-091-1/+1
|
* Make Yarn quieter during precompilation as that is typically run by a deploy ↵David Heinemeier Hansson2017-01-191-1/+1
| | | | tool like Capistrano and we dont need the play-by-play
* only enhance when `assets:precompile` task is definedyuuji.yaginuma2017-01-181-1/+3
|
* Fix all rubocop violationsRafael Mendonça França2017-01-171-2/+2
|
* Be a bit more explicit rather than relying on the default taskDavid Heinemeier Hansson2017-01-171-1/+1
|
* Make yarn install available as a rake task via yarn:install so we can use ↵David Heinemeier Hansson2017-01-171-0/+9
that as a dependency for assets:precompile