From f6a8cbefbc291eff9f85c1fd7ad4e2c90fa3452f Mon Sep 17 00:00:00 2001 From: Guillaume Date: Wed, 11 Oct 2017 15:00:32 +0200 Subject: add dev and staging file for wepack config, modify spec task --- config/webpack/dev.js | 12 ++++++++++++ config/webpack/staging.js | 12 ++++++++++++ config/webpacker.yml | 18 ++++++++++++++++++ lib/tasks/ci.rake | 2 +- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 config/webpack/dev.js create mode 100644 config/webpack/staging.js diff --git a/config/webpack/dev.js b/config/webpack/dev.js new file mode 100644 index 000000000..97b6a77ff --- /dev/null +++ b/config/webpack/dev.js @@ -0,0 +1,12 @@ +const environment = require('./environment') + +environment.plugins.set( + 'UglifyJs', + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false + } + }) +) + +module.exports = environment.toWebpackConfig() \ No newline at end of file diff --git a/config/webpack/staging.js b/config/webpack/staging.js new file mode 100644 index 000000000..97b6a77ff --- /dev/null +++ b/config/webpack/staging.js @@ -0,0 +1,12 @@ +const environment = require('./environment') + +environment.plugins.set( + 'UglifyJs', + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false + } + }) +) + +module.exports = environment.toWebpackConfig() \ No newline at end of file diff --git a/config/webpacker.yml b/config/webpacker.yml index 51afa9df5..be1105bad 100644 --- a/config/webpacker.yml +++ b/config/webpacker.yml @@ -61,3 +61,21 @@ production: # Cache manifest.json for performance cache_manifest: true + +dev: + <<: *default + + # Production depends on precompilation of packs prior to booting for performance. + compile: false + + # Cache manifest.json for performance + cache_manifest: true + +staging: + <<: *default + + # Production depends on precompilation of packs prior to booting for performance. + compile: false + + # Cache manifest.json for performance + cache_manifest: true diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 3f947fb08..633bf82ad 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -32,7 +32,7 @@ namespace :ci do end task :spec do - sh "rspec --profile" + sh "bundle exec rake spec" end desc "Deploy after CI" -- cgit v1.2.3