From 1a404a984a79b5029dcb357a6c6c68c70ddf21b8 Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Thu, 12 Oct 2017 15:18:06 +0200 Subject: Use yarn and not npm anymore --- lib/tasks/ci.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 633bf82ad..ace042546 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -3,7 +3,7 @@ namespace :ci do task :setup do cp "config/database/jenkins.yml", "config/database.yml" sh "RAILS_ENV=test rake db:drop db:create db:migrate" - sh "npm --production --no-progress install" + sh "yarn --production --no-progress install" end def git_branch -- cgit v1.2.3 From e4440e131668e6a09e453fccb9019e6d6f9d3581 Mon Sep 17 00:00:00 2001 From: Florent Peyraud Date: Thu, 12 Oct 2017 15:40:07 +0200 Subject: remove capistrano-npm --- Gemfile | 2 +- config/deploy.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 80956c332..fbe8f4c4e 100644 --- a/Gemfile +++ b/Gemfile @@ -140,7 +140,7 @@ gem 'letter_opener' group :development do gem 'capistrano', '2.13.5' gem 'capistrano-ext' - gem 'capistrano-npm', require: false + #gem 'capistrano-npm', require: false # Issue #3017 Requires ruby_dep which requires ruby > 2.2.3 # gem 'guard' # gem 'guard-rspec', "~> 4.5.0" diff --git a/config/deploy.rb b/config/deploy.rb index 3ca2b4a4e..5fff31a4a 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -23,10 +23,10 @@ ssh_options[:forward_agent] = true require "bundler/capistrano" require 'whenever/capistrano' -require 'capistrano/npm' -set :npm_options, '--production --no-progress' +#require 'capistrano/npm' +#set :npm_options, '--production --no-progress' -after 'deploy:finalize_update', 'npm:install' +#after 'deploy:finalize_update', 'npm:install' # Whenever set :whenever_variables, ->{ "'environment=#{fetch :whenever_environment}&bundle_command=bin/bundle exec&additionnal_path=/var/lib/gems/2.2.0/bin'" } # invoke bin/bundle to use 'correct' ruby environment -- cgit v1.2.3 From 0330dcdff13294283451659d4fa87db49ce9d4ef Mon Sep 17 00:00:00 2001 From: Florent Peyraud Date: Thu, 12 Oct 2017 15:48:32 +0200 Subject: with Gemfile.lock this time --- Gemfile.lock | 3 --- 1 file changed, 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4ea8d071a..da7c4f3c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -121,8 +121,6 @@ GEM net-ssh-gateway (>= 1.1.0) capistrano-ext (1.2.1) capistrano (>= 1.0.0) - capistrano-npm (0.0.2) - capistrano (>= 2.5.5) capybara (2.4.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -574,7 +572,6 @@ DEPENDENCIES calendar_helper (= 0.2.5) capistrano (= 2.13.5) capistrano-ext - capistrano-npm capybara (~> 2.4.0) carrierwave (~> 1.0) cocoon -- cgit v1.2.3 From 65e5ac79147b6c55b76bcabf741b326d31317bd2 Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Thu, 12 Oct 2017 17:22:37 +0200 Subject: Fix environment variables for webpack --- config/webpack/dev.js | 4 +++- config/webpack/environment.js | 4 +--- config/webpack/production.js | 4 +++- config/webpack/staging.js | 4 +++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/config/webpack/dev.js b/config/webpack/dev.js index 97b6a77ff..7703f8452 100644 --- a/config/webpack/dev.js +++ b/config/webpack/dev.js @@ -1,4 +1,6 @@ const environment = require('./environment') +const webpack = require('webpack') +const UglifyJsPlugin = require('uglify-js') environment.plugins.set( 'UglifyJs', @@ -9,4 +11,4 @@ environment.plugins.set( }) ) -module.exports = environment.toWebpackConfig() \ No newline at end of file +module.exports = environment.toWebpackConfig() diff --git a/config/webpack/environment.js b/config/webpack/environment.js index ae1deb610..7a96539f1 100644 --- a/config/webpack/environment.js +++ b/config/webpack/environment.js @@ -1,6 +1,4 @@ const { environment } = require('@rails/webpacker') -const webpack = require('webpack') -const UglifyJsPlugin = require('uglify-js') const CleanWebpackPlugin = require('clean-webpack-plugin') let pathsToClean = [ @@ -33,4 +31,4 @@ environment.plugins.set( // jquery: "jquery/src/jquery", // } -module.exports = environment \ No newline at end of file +module.exports = environment diff --git a/config/webpack/production.js b/config/webpack/production.js index 97b6a77ff..7703f8452 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -1,4 +1,6 @@ const environment = require('./environment') +const webpack = require('webpack') +const UglifyJsPlugin = require('uglify-js') environment.plugins.set( 'UglifyJs', @@ -9,4 +11,4 @@ environment.plugins.set( }) ) -module.exports = environment.toWebpackConfig() \ No newline at end of file +module.exports = environment.toWebpackConfig() diff --git a/config/webpack/staging.js b/config/webpack/staging.js index 97b6a77ff..7703f8452 100644 --- a/config/webpack/staging.js +++ b/config/webpack/staging.js @@ -1,4 +1,6 @@ const environment = require('./environment') +const webpack = require('webpack') +const UglifyJsPlugin = require('uglify-js') environment.plugins.set( 'UglifyJs', @@ -9,4 +11,4 @@ environment.plugins.set( }) ) -module.exports = environment.toWebpackConfig() \ No newline at end of file +module.exports = environment.toWebpackConfig() -- cgit v1.2.3