diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-10-25 07:43:06 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-10-25 07:45:33 +0900 |
commit | 510147c1c63ded90d8668e85f2150dd637543fa9 (patch) | |
tree | ca2a25e29d5f7515758b476b55221b072da6a85c /railties | |
parent | ec7bf399b12c8aea6d506106cc5408f2f17ed349 (diff) | |
download | rails-510147c1c63ded90d8668e85f2150dd637543fa9.tar.gz rails-510147c1c63ded90d8668e85f2150dd637543fa9.tar.bz2 rails-510147c1c63ded90d8668e85f2150dd637543fa9.zip |
Change `VENDOR_PATH` to `APP_ROOT` in `bin/yarn`
This variable was initially used to hold the vendor directory.
https://github.com/rails/rails/commit/3dac36b
Therefore, the variable name `VENDOR_PATH` was appropriate.
However, `package.json` is now placed in the root of the project.
https://github.com/rails/rails/commit/8e9e943
Therefore, like other bin scripts, I think the variable name `APP_ROOT`
is appropriate.
https://github.com/rails/rails/blob/2c845f6b03ddf2aa233b00385d24d769a4a34fa6/railties/lib/rails/generators/rails/app/templates/bin/setup.tt#L5
https://github.com/rails/rails/blob/2c845f6b03ddf2aa233b00385d24d769a4a34fa6/railties/lib/rails/generators/rails/app/templates/bin/update.tt#L5
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/bin/yarn | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/bin/yarn b/railties/lib/rails/generators/rails/app/templates/bin/yarn index c2f9b6768a..b4e4d95286 100644 --- a/railties/lib/rails/generators/rails/app/templates/bin/yarn +++ b/railties/lib/rails/generators/rails/app/templates/bin/yarn @@ -1,5 +1,5 @@ -VENDOR_PATH = File.expand_path('..', __dir__) -Dir.chdir(VENDOR_PATH) do +APP_ROOT = File.expand_path('..', __dir__) +Dir.chdir(APP_ROOT) do begin exec "yarnpkg #{ARGV.join(' ')}" rescue Errno::ENOENT |