From 941ff0a01d4a8f11a7479b49253ae1371a47e191 Mon Sep 17 00:00:00 2001 From: Juan Ignacio Donoso Date: Fri, 10 Mar 2017 09:22:36 -0500 Subject: [PATCH] Replace npm references with yarn --- .gitignore | 3 ++- Procfile | 2 +- bin/setup | 4 ++-- lib/tasks/js.rake | 2 +- lib/tasks/webpack.rake | 2 +- package.json | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 6ccc30d04..3b92ccd4a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ dump.rdb node_modules/ app/assets/webpack/app-bundle.js app/assets/webpack/vendor-bundle.js -npm-debug.log \ No newline at end of file +yarn-debug.log* +yarn-error.log* \ No newline at end of file diff --git a/Procfile b/Procfile index 20134c951..1e5848789 100644 --- a/Procfile +++ b/Procfile @@ -1,5 +1,5 @@ web: bundle exec puma -C config/puma.rb -client: sh -c 'rm app/assets/webpack/* || true && npm run build:watch' +client: sh -c 'rm app/assets/webpack/* || true && yarn run build:watch' resque_high: env TERM_CHILD=1 RESQUE_TERM_TIMEOUT=8 QUEUE=high,medium bundle exec rake resque:work resque_medium: env TERM_CHILD=1 RESQUE_TERM_TIMEOUT=8 QUEUE=medium bundle exec rake resque:work resque_low: env TERM_CHILD=1 RESQUE_TERM_TIMEOUT=8 QUEUE=low,medium bundle exec rake resque:work diff --git a/bin/setup b/bin/setup index 0c5f0b625..489c3bed5 100755 --- a/bin/setup +++ b/bin/setup @@ -3,8 +3,8 @@ # Set up Ruby bundle install -# Install NPM modules -npm install +# Install Node modules +yarn # Add binstubs to PATH via export PATH=".git/safe/../../bin:$PATH" in ~/.zshenv mkdir -p .git/safe diff --git a/lib/tasks/js.rake b/lib/tasks/js.rake index 593546bb2..57fc099cf 100644 --- a/lib/tasks/js.rake +++ b/lib/tasks/js.rake @@ -1,5 +1,5 @@ namespace :js do task spec: "webpack:build" do - sh "npm run test" + sh "yarn run test" end end diff --git a/lib/tasks/webpack.rake b/lib/tasks/webpack.rake index 2ba3678d3..4f24994bb 100644 --- a/lib/tasks/webpack.rake +++ b/lib/tasks/webpack.rake @@ -1,6 +1,6 @@ namespace :webpack do desc "Build the asset bundle with Webpack" task :build do - sh "npm run build" + sh "yarn run build" end end diff --git a/package.json b/package.json index ff92f8861..6a3063d81 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "engines": { "node": "7.4", - "npm": "4.0.5" + "yarn": "^0.14.0" }, "dependencies": { "autoprefixer": "^6.3.2",