webpacker 3.6.0 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.node-version +1 -0
- data/.travis.yml +12 -4
- data/CHANGELOG.md +240 -28
- data/CONTRIBUTING.md +33 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +78 -71
- data/MIT-LICENSE +1 -1
- data/README.md +75 -16
- data/docs/assets.md +7 -4
- data/docs/css.md +47 -14
- data/docs/deployment.md +11 -0
- data/docs/engines.md +155 -0
- data/docs/es6.md +5 -5
- data/docs/testing.md +1 -1
- data/docs/troubleshooting.md +4 -4
- data/docs/v4-upgrade.md +132 -0
- data/docs/webpack.md +56 -3
- data/docs/yarn.md +12 -1
- data/gemfiles/Gemfile-rails-edge +1 -1
- data/gemfiles/Gemfile-rails.4.2.x +2 -2
- data/gemfiles/Gemfile-rails.5.0.x +2 -2
- data/gemfiles/Gemfile-rails.5.1.x +2 -2
- data/gemfiles/Gemfile-rails.5.2.x +10 -0
- data/lib/install/bin/webpack +5 -1
- data/lib/install/bin/webpack-dev-server +5 -1
- data/lib/install/coffee.rb +2 -2
- data/lib/install/config/.browserslistrc +1 -0
- data/lib/install/config/babel.config.js +70 -0
- data/lib/install/config/postcss.config.js +12 -0
- data/lib/install/config/webpacker.yml +26 -0
- data/lib/install/elm.rb +2 -2
- data/lib/install/erb.rb +2 -2
- data/lib/install/examples/react/babel.config.js +83 -0
- data/lib/install/examples/stimulus/application.js +1 -6
- data/lib/install/examples/stimulus/controllers/index.js +9 -0
- data/lib/install/examples/typescript/tsconfig.json +4 -0
- data/lib/install/examples/vue/hello_vue.js +6 -4
- data/lib/install/javascript/packs/application.js +8 -0
- data/lib/install/loaders/typescript.js +8 -3
- data/lib/install/loaders/vue.js +1 -8
- data/lib/install/react.rb +6 -19
- data/lib/install/template.rb +29 -30
- data/lib/install/typescript.rb +4 -4
- data/lib/install/vue.rb +14 -5
- data/lib/tasks/installers.rake +4 -2
- data/lib/tasks/webpacker/binstubs.rake +3 -2
- data/lib/tasks/webpacker/compile.rake +10 -5
- data/lib/tasks/webpacker/install.rake +3 -2
- data/lib/tasks/webpacker/verify_install.rake +1 -4
- data/lib/tasks/webpacker/yarn_install.rake +1 -1
- data/lib/webpacker/commands.rb +0 -1
- data/lib/webpacker/compiler.rb +17 -13
- data/lib/webpacker/configuration.rb +13 -5
- data/lib/webpacker/dev_server.rb +7 -10
- data/lib/webpacker/dev_server_proxy.rb +13 -6
- data/lib/webpacker/dev_server_runner.rb +13 -6
- data/lib/webpacker/helper.rb +78 -20
- data/lib/webpacker/manifest.rb +64 -21
- data/lib/webpacker/railtie.rb +16 -7
- data/lib/webpacker/runner.rb +3 -3
- data/lib/webpacker/version.rb +1 -1
- data/lib/webpacker/webpack_runner.rb +14 -3
- data/package.json +46 -34
- data/package/__tests__/config.js +37 -3
- data/package/__tests__/dev_server.js +15 -0
- data/package/__tests__/production.js +2 -2
- data/package/__tests__/staging.js +3 -3
- data/package/__tests__/test.js +2 -1
- data/package/config.js +21 -9
- data/package/config_types/config_list.js +5 -6
- data/package/dev_server.js +3 -1
- data/package/environments/__tests__/base.js +7 -5
- data/package/environments/base.js +84 -31
- data/package/environments/development.js +6 -2
- data/package/environments/production.js +46 -36
- data/package/rules/babel.js +10 -4
- data/package/rules/file.js +8 -3
- data/package/rules/index.js +7 -2
- data/package/rules/node_modules.js +23 -0
- data/package/utils/__tests__/get_style_rule.js +20 -0
- data/package/utils/deep_merge.js +5 -6
- data/package/utils/get_style_rule.js +29 -42
- data/package/utils/helpers.js +18 -6
- data/package/utils/objectify.js +1 -2
- data/test/compiler_test.rb +15 -3
- data/test/configuration_test.rb +9 -0
- data/test/dev_server_runner_test.rb +51 -0
- data/test/helper_test.rb +48 -5
- data/test/manifest_test.rb +14 -0
- data/test/rake_tasks_test.rb +34 -0
- data/test/test_app/config.ru +5 -0
- data/test/test_app/config/application.rb +1 -0
- data/test/test_app/config/webpack/development.js +0 -0
- data/test/test_app/config/webpacker.yml +20 -0
- data/test/test_app/config/webpacker_public_root.yml +19 -0
- data/test/test_app/package.json +13 -0
- data/test/test_app/public/packs/manifest.json +22 -1
- data/test/test_app/yarn.lock +11 -0
- data/test/test_helper.rb +1 -3
- data/test/webpack_runner_test.rb +51 -0
- data/yarn.lock +4077 -2816
- metadata +28 -6
- data/lib/install/config/.babelrc +0 -18
- data/lib/install/config/.postcssrc.yml +0 -3
- data/lib/install/examples/react/.babelrc +0 -6
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpacker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -78,9 +78,11 @@ files:
|
|
78
78
|
- ".eslintignore"
|
79
79
|
- ".eslintrc.js"
|
80
80
|
- ".gitignore"
|
81
|
+
- ".node-version"
|
81
82
|
- ".rubocop.yml"
|
82
83
|
- ".travis.yml"
|
83
84
|
- CHANGELOG.md
|
85
|
+
- CONTRIBUTING.md
|
84
86
|
- Gemfile
|
85
87
|
- Gemfile.lock
|
86
88
|
- MIT-LICENSE
|
@@ -91,6 +93,7 @@ files:
|
|
91
93
|
- docs/css.md
|
92
94
|
- docs/deployment.md
|
93
95
|
- docs/docker.md
|
96
|
+
- docs/engines.md
|
94
97
|
- docs/env.md
|
95
98
|
- docs/es6.md
|
96
99
|
- docs/folder-structure.md
|
@@ -99,6 +102,7 @@ files:
|
|
99
102
|
- docs/testing.md
|
100
103
|
- docs/troubleshooting.md
|
101
104
|
- docs/typescript.md
|
105
|
+
- docs/v4-upgrade.md
|
102
106
|
- docs/webpack-dev-server.md
|
103
107
|
- docs/webpack.md
|
104
108
|
- docs/yarn.md
|
@@ -106,13 +110,15 @@ files:
|
|
106
110
|
- gemfiles/Gemfile-rails.4.2.x
|
107
111
|
- gemfiles/Gemfile-rails.5.0.x
|
108
112
|
- gemfiles/Gemfile-rails.5.1.x
|
113
|
+
- gemfiles/Gemfile-rails.5.2.x
|
109
114
|
- lib/install/angular.rb
|
110
115
|
- lib/install/bin/webpack
|
111
116
|
- lib/install/bin/webpack-dev-server
|
112
117
|
- lib/install/binstubs.rb
|
113
118
|
- lib/install/coffee.rb
|
114
|
-
- lib/install/config/.
|
115
|
-
- lib/install/config
|
119
|
+
- lib/install/config/.browserslistrc
|
120
|
+
- lib/install/config/babel.config.js
|
121
|
+
- lib/install/config/postcss.config.js
|
116
122
|
- lib/install/config/webpack/development.js
|
117
123
|
- lib/install/config/webpack/environment.js
|
118
124
|
- lib/install/config/webpack/production.js
|
@@ -129,11 +135,12 @@ files:
|
|
129
135
|
- lib/install/examples/elm/Main.elm
|
130
136
|
- lib/install/examples/elm/hello_elm.js
|
131
137
|
- lib/install/examples/erb/hello_erb.js.erb
|
132
|
-
- lib/install/examples/react
|
138
|
+
- lib/install/examples/react/babel.config.js
|
133
139
|
- lib/install/examples/react/hello_react.jsx
|
134
140
|
- lib/install/examples/react/tsconfig.json
|
135
141
|
- lib/install/examples/stimulus/application.js
|
136
142
|
- lib/install/examples/stimulus/controllers/hello_controller.js
|
143
|
+
- lib/install/examples/stimulus/controllers/index.js
|
137
144
|
- lib/install/examples/typescript/hello_typescript.ts
|
138
145
|
- lib/install/examples/typescript/tsconfig.json
|
139
146
|
- lib/install/examples/vue/app.vue
|
@@ -204,6 +211,7 @@ files:
|
|
204
211
|
- package/rules/index.js
|
205
212
|
- package/rules/module.css.js
|
206
213
|
- package/rules/module.sass.js
|
214
|
+
- package/rules/node_modules.js
|
207
215
|
- package/rules/sass.js
|
208
216
|
- package/utils/__tests__/deep_assign.js
|
209
217
|
- package/utils/__tests__/deep_merge.js
|
@@ -217,6 +225,7 @@ files:
|
|
217
225
|
- test/command_test.rb
|
218
226
|
- test/compiler_test.rb
|
219
227
|
- test/configuration_test.rb
|
228
|
+
- test/dev_server_runner_test.rb
|
220
229
|
- test/dev_server_test.rb
|
221
230
|
- test/env_test.rb
|
222
231
|
- test/helper_test.rb
|
@@ -226,11 +235,17 @@ files:
|
|
226
235
|
- test/test_app/app/javascript/packs/application.js
|
227
236
|
- test/test_app/bin/webpack
|
228
237
|
- test/test_app/bin/webpack-dev-server
|
238
|
+
- test/test_app/config.ru
|
229
239
|
- test/test_app/config/application.rb
|
230
240
|
- test/test_app/config/environment.rb
|
241
|
+
- test/test_app/config/webpack/development.js
|
231
242
|
- test/test_app/config/webpacker.yml
|
243
|
+
- test/test_app/config/webpacker_public_root.yml
|
244
|
+
- test/test_app/package.json
|
232
245
|
- test/test_app/public/packs/manifest.json
|
246
|
+
- test/test_app/yarn.lock
|
233
247
|
- test/test_helper.rb
|
248
|
+
- test/webpack_runner_test.rb
|
234
249
|
- test/webpacker_test.rb
|
235
250
|
- webpacker.gemspec
|
236
251
|
- yarn.lock
|
@@ -238,8 +253,8 @@ homepage: https://github.com/rails/webpacker
|
|
238
253
|
licenses:
|
239
254
|
- MIT
|
240
255
|
metadata:
|
241
|
-
source_code_uri: https://github.com/rails/webpacker/tree/
|
242
|
-
changelog_uri: https://github.com/rails/webpacker/blob/
|
256
|
+
source_code_uri: https://github.com/rails/webpacker/tree/v4.0.2
|
257
|
+
changelog_uri: https://github.com/rails/webpacker/blob/v4.0.2/CHANGELOG.md
|
243
258
|
post_install_message:
|
244
259
|
rdoc_options: []
|
245
260
|
require_paths:
|
@@ -264,6 +279,7 @@ test_files:
|
|
264
279
|
- test/command_test.rb
|
265
280
|
- test/compiler_test.rb
|
266
281
|
- test/configuration_test.rb
|
282
|
+
- test/dev_server_runner_test.rb
|
267
283
|
- test/dev_server_test.rb
|
268
284
|
- test/env_test.rb
|
269
285
|
- test/helper_test.rb
|
@@ -273,9 +289,15 @@ test_files:
|
|
273
289
|
- test/test_app/app/javascript/packs/application.js
|
274
290
|
- test/test_app/bin/webpack
|
275
291
|
- test/test_app/bin/webpack-dev-server
|
292
|
+
- test/test_app/config.ru
|
276
293
|
- test/test_app/config/application.rb
|
277
294
|
- test/test_app/config/environment.rb
|
295
|
+
- test/test_app/config/webpack/development.js
|
278
296
|
- test/test_app/config/webpacker.yml
|
297
|
+
- test/test_app/config/webpacker_public_root.yml
|
298
|
+
- test/test_app/package.json
|
279
299
|
- test/test_app/public/packs/manifest.json
|
300
|
+
- test/test_app/yarn.lock
|
280
301
|
- test/test_helper.rb
|
302
|
+
- test/webpack_runner_test.rb
|
281
303
|
- test/webpacker_test.rb
|
data/lib/install/config/.babelrc
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"presets": [
|
3
|
-
["env", {
|
4
|
-
"modules": false,
|
5
|
-
"targets": {
|
6
|
-
"browsers": "> 1%",
|
7
|
-
"uglify": true
|
8
|
-
},
|
9
|
-
"useBuiltIns": true
|
10
|
-
}]
|
11
|
-
],
|
12
|
-
|
13
|
-
"plugins": [
|
14
|
-
"syntax-dynamic-import",
|
15
|
-
"transform-object-rest-spread",
|
16
|
-
["transform-class-properties", { "spec": true }]
|
17
|
-
]
|
18
|
-
}
|