aboutsummaryrefslogtreecommitdiffstats
path: root/test/dummy/config
diff options
context:
space:
mode:
authorJavan Makhmali <javan@javan.us>2018-02-12 10:34:29 -0500
committerJavan Makhmali <javan@javan.us>2018-02-12 10:34:29 -0500
commit2f13b3c9fe21debec4bd9afe4601125f4fe29ce2 (patch)
tree973bfc4599de65fddfe39206374b7424f4e7e7ec /test/dummy/config
parent63add5acc4a9bd84907bf6bf17de307792336539 (diff)
downloadrails-2f13b3c9fe21debec4bd9afe4601125f4fe29ce2.tar.gz
rails-2f13b3c9fe21debec4bd9afe4601125f4fe29ce2.tar.bz2
rails-2f13b3c9fe21debec4bd9afe4601125f4fe29ce2.zip
Pull activetext.js into dummy app with webpacker
Diffstat (limited to 'test/dummy/config')
-rw-r--r--test/dummy/config/environments/development.rb2
-rw-r--r--test/dummy/config/environments/production.rb2
-rw-r--r--test/dummy/config/webpack/development.js3
-rw-r--r--test/dummy/config/webpack/environment.js3
-rw-r--r--test/dummy/config/webpack/production.js3
-rw-r--r--test/dummy/config/webpack/test.js3
-rw-r--r--test/dummy/config/webpacker.yml65
7 files changed, 81 insertions, 0 deletions
diff --git a/test/dummy/config/environments/development.rb b/test/dummy/config/environments/development.rb
index 366e75ad77..42768bf68c 100644
--- a/test/dummy/config/environments/development.rb
+++ b/test/dummy/config/environments/development.rb
@@ -1,4 +1,6 @@
Rails.application.configure do
+ # Verifies that versions and hashed value of the package contents in the project's package.json
+ config.webpacker.check_yarn_integrity = true
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
diff --git a/test/dummy/config/environments/production.rb b/test/dummy/config/environments/production.rb
index 9ea5ad2784..2aaa79f620 100644
--- a/test/dummy/config/environments/production.rb
+++ b/test/dummy/config/environments/production.rb
@@ -1,4 +1,6 @@
Rails.application.configure do
+ # Verifies that versions and hashed value of the package contents in the project's package.json
+ config.webpacker.check_yarn_integrity = false
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
diff --git a/test/dummy/config/webpack/development.js b/test/dummy/config/webpack/development.js
new file mode 100644
index 0000000000..81269f6513
--- /dev/null
+++ b/test/dummy/config/webpack/development.js
@@ -0,0 +1,3 @@
+const environment = require('./environment')
+
+module.exports = environment.toWebpackConfig()
diff --git a/test/dummy/config/webpack/environment.js b/test/dummy/config/webpack/environment.js
new file mode 100644
index 0000000000..d16d9af743
--- /dev/null
+++ b/test/dummy/config/webpack/environment.js
@@ -0,0 +1,3 @@
+const { environment } = require('@rails/webpacker')
+
+module.exports = environment
diff --git a/test/dummy/config/webpack/production.js b/test/dummy/config/webpack/production.js
new file mode 100644
index 0000000000..81269f6513
--- /dev/null
+++ b/test/dummy/config/webpack/production.js
@@ -0,0 +1,3 @@
+const environment = require('./environment')
+
+module.exports = environment.toWebpackConfig()
diff --git a/test/dummy/config/webpack/test.js b/test/dummy/config/webpack/test.js
new file mode 100644
index 0000000000..81269f6513
--- /dev/null
+++ b/test/dummy/config/webpack/test.js
@@ -0,0 +1,3 @@
+const environment = require('./environment')
+
+module.exports = environment.toWebpackConfig()
diff --git a/test/dummy/config/webpacker.yml b/test/dummy/config/webpacker.yml
new file mode 100644
index 0000000000..d3f24e1b4b
--- /dev/null
+++ b/test/dummy/config/webpacker.yml
@@ -0,0 +1,65 @@
+# Note: You must restart bin/webpack-dev-server for changes to take effect
+
+default: &default
+ source_path: app/javascript
+ source_entry_path: packs
+ public_output_path: packs
+ cache_path: tmp/cache/webpacker
+
+ # Additional paths webpack should lookup modules
+ # ['app/assets', 'engine/foo/app/assets']
+ resolved_paths: []
+
+ # Reload manifest.json on all requests so we reload latest compiled packs
+ cache_manifest: false
+
+ extensions:
+ - .js
+ - .sass
+ - .scss
+ - .css
+ - .png
+ - .svg
+ - .gif
+ - .jpeg
+ - .jpg
+
+development:
+ <<: *default
+ compile: true
+
+ # Reference: https://webpack.js.org/configuration/dev-server/
+ dev_server:
+ https: false
+ host: localhost
+ port: 3035
+ public: localhost:3035
+ hmr: false
+ # Inline should be set to true if using HMR
+ inline: true
+ overlay: true
+ compress: true
+ disable_host_check: true
+ use_local_ip: false
+ quiet: false
+ headers:
+ 'Access-Control-Allow-Origin': '*'
+ watch_options:
+ ignored: /node_modules/
+
+
+test:
+ <<: *default
+ compile: true
+
+ # Compile test packs to a separate directory
+ public_output_path: packs-test
+
+production:
+ <<: *default
+
+ # Production depends on precompilation of packs prior to booting for performance.
+ compile: false
+
+ # Cache manifest.json for performance
+ cache_manifest: true