shakapacker 6.0.0.rc.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +7 -0
  2. data/.eslintignore +4 -0
  3. data/.eslintrc.js +14 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  5. data/.github/ISSUE_TEMPLATE/feature-request.md +18 -0
  6. data/.github/workflows/jest.yml +30 -0
  7. data/.github/workflows/js-lint.yml +31 -0
  8. data/.github/workflows/rubocop.yml +39 -0
  9. data/.github/workflows/ruby.yml +48 -0
  10. data/.gitignore +13 -0
  11. data/.node-version +1 -0
  12. data/.rubocop.yml +229 -0
  13. data/CHANGELOG.md +32 -0
  14. data/CONTRIBUTING.md +62 -0
  15. data/Gemfile +13 -0
  16. data/Gemfile.lock +183 -0
  17. data/MIT-LICENSE +20 -0
  18. data/README.md +666 -0
  19. data/Rakefile +11 -0
  20. data/config/README.md +3 -0
  21. data/config/webpacker.yml +1 -0
  22. data/docs/customizing_babel_config.md +59 -0
  23. data/docs/deployment.md +116 -0
  24. data/docs/developing_webpacker.md +29 -0
  25. data/docs/troubleshooting.md +212 -0
  26. data/docs/v6_upgrade.md +158 -0
  27. data/gemfiles/Gemfile-rails-edge +12 -0
  28. data/gemfiles/Gemfile-rails.5.2.x +9 -0
  29. data/gemfiles/Gemfile-rails.6.0.x +9 -0
  30. data/gemfiles/Gemfile-rails.6.1.x +12 -0
  31. data/lib/install/application.js +15 -0
  32. data/lib/install/bin/webpacker +15 -0
  33. data/lib/install/bin/webpacker-dev-server +18 -0
  34. data/lib/install/bin/yarn +18 -0
  35. data/lib/install/binstubs.rb +4 -0
  36. data/lib/install/config/webpack/webpack.config.js +5 -0
  37. data/lib/install/config/webpacker.yml +64 -0
  38. data/lib/install/package.json +15 -0
  39. data/lib/install/template.rb +100 -0
  40. data/lib/shakapacker/utils/git_utils.rb +23 -0
  41. data/lib/shakapacker/utils/version_syntax_converter.rb +24 -0
  42. data/lib/tasks/webpacker/binstubs.rake +15 -0
  43. data/lib/tasks/webpacker/check_binstubs.rake +12 -0
  44. data/lib/tasks/webpacker/check_node.rake +31 -0
  45. data/lib/tasks/webpacker/check_yarn.rake +33 -0
  46. data/lib/tasks/webpacker/clean.rake +25 -0
  47. data/lib/tasks/webpacker/clobber.rake +20 -0
  48. data/lib/tasks/webpacker/compile.rake +45 -0
  49. data/lib/tasks/webpacker/info.rake +21 -0
  50. data/lib/tasks/webpacker/install.rake +17 -0
  51. data/lib/tasks/webpacker/verify_config.rake +14 -0
  52. data/lib/tasks/webpacker/verify_install.rake +4 -0
  53. data/lib/tasks/webpacker/yarn_install.rake +18 -0
  54. data/lib/tasks/webpacker.rake +19 -0
  55. data/lib/tasks/yarn.rake +38 -0
  56. data/lib/webpacker/commands.rb +79 -0
  57. data/lib/webpacker/compiler.rb +130 -0
  58. data/lib/webpacker/configuration.rb +111 -0
  59. data/lib/webpacker/dev_server.rb +72 -0
  60. data/lib/webpacker/dev_server_proxy.rb +33 -0
  61. data/lib/webpacker/dev_server_runner.rb +96 -0
  62. data/lib/webpacker/env.rb +43 -0
  63. data/lib/webpacker/helper.rb +161 -0
  64. data/lib/webpacker/instance.rb +41 -0
  65. data/lib/webpacker/manifest.rb +120 -0
  66. data/lib/webpacker/railtie.rb +63 -0
  67. data/lib/webpacker/runner.rb +23 -0
  68. data/lib/webpacker/version.rb +4 -0
  69. data/lib/webpacker/webpack_runner.rb +58 -0
  70. data/lib/webpacker.rb +46 -0
  71. data/package/__tests__/config.js +34 -0
  72. data/package/__tests__/dev_server.js +45 -0
  73. data/package/__tests__/development.js +35 -0
  74. data/package/__tests__/env.js +58 -0
  75. data/package/__tests__/index.js +9 -0
  76. data/package/__tests__/production.js +29 -0
  77. data/package/__tests__/staging.js +30 -0
  78. data/package/__tests__/test.js +25 -0
  79. data/package/babel/preset.js +41 -0
  80. data/package/config.js +32 -0
  81. data/package/configPath.js +3 -0
  82. data/package/dev_server.js +20 -0
  83. data/package/env.js +27 -0
  84. data/package/environments/__tests__/base.js +69 -0
  85. data/package/environments/base.js +116 -0
  86. data/package/environments/development.js +55 -0
  87. data/package/environments/production.js +79 -0
  88. data/package/environments/test.js +3 -0
  89. data/package/index.js +33 -0
  90. data/package/inliningCss.js +7 -0
  91. data/package/rules/babel.js +30 -0
  92. data/package/rules/coffee.js +6 -0
  93. data/package/rules/css.js +3 -0
  94. data/package/rules/erb.js +15 -0
  95. data/package/rules/file.js +23 -0
  96. data/package/rules/index.js +18 -0
  97. data/package/rules/less.js +22 -0
  98. data/package/rules/raw.js +5 -0
  99. data/package/rules/sass.js +16 -0
  100. data/package/rules/stylus.js +26 -0
  101. data/package/utils/get_style_rule.js +37 -0
  102. data/package/utils/helpers.js +51 -0
  103. data/package.json +71 -0
  104. data/rakelib/release.rake +57 -0
  105. data/test/command_test.rb +109 -0
  106. data/test/compiler_test.rb +68 -0
  107. data/test/configuration_test.rb +78 -0
  108. data/test/dev_server_runner_test.rb +81 -0
  109. data/test/dev_server_test.rb +47 -0
  110. data/test/engine_rake_tasks_test.rb +39 -0
  111. data/test/env_test.rb +23 -0
  112. data/test/helper_test.rb +159 -0
  113. data/test/manifest_test.rb +89 -0
  114. data/test/mounted_app/Rakefile +4 -0
  115. data/test/mounted_app/test/dummy/Rakefile +3 -0
  116. data/test/mounted_app/test/dummy/bin/rails +3 -0
  117. data/test/mounted_app/test/dummy/bin/rake +3 -0
  118. data/test/mounted_app/test/dummy/config/application.rb +10 -0
  119. data/test/mounted_app/test/dummy/config/environment.rb +3 -0
  120. data/test/mounted_app/test/dummy/config/webpacker.yml +75 -0
  121. data/test/mounted_app/test/dummy/config.ru +5 -0
  122. data/test/mounted_app/test/dummy/package.json +7 -0
  123. data/test/rake_tasks_test.rb +71 -0
  124. data/test/test_app/Rakefile +3 -0
  125. data/test/test_app/app/packs/entrypoints/application.js +10 -0
  126. data/test/test_app/app/packs/entrypoints/multi_entry.css +4 -0
  127. data/test/test_app/app/packs/entrypoints/multi_entry.js +4 -0
  128. data/test/test_app/bin/webpacker +14 -0
  129. data/test/test_app/bin/webpacker-dev-server +14 -0
  130. data/test/test_app/config/application.rb +11 -0
  131. data/test/test_app/config/environment.rb +4 -0
  132. data/test/test_app/config/initializers/inspect_autoload_paths.rb +1 -0
  133. data/test/test_app/config/webpack/webpack.config.js +0 -0
  134. data/test/test_app/config/webpacker.yml +77 -0
  135. data/test/test_app/config/webpacker_other_location.yml +79 -0
  136. data/test/test_app/config/webpacker_public_root.yml +18 -0
  137. data/test/test_app/config.ru +5 -0
  138. data/test/test_app/package.json +13 -0
  139. data/test/test_app/public/packs/manifest.json +50 -0
  140. data/test/test_app/some.config.js +0 -0
  141. data/test/test_app/yarn.lock +11 -0
  142. data/test/test_helper.rb +33 -0
  143. data/test/webpack_runner_test.rb +57 -0
  144. data/test/webpacker_test.rb +34 -0
  145. data/webpacker.gemspec +31 -0
  146. data/yarn.lock +4029 -0
  147. metadata +331 -0
metadata ADDED
@@ -0,0 +1,331 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shakapacker
3
+ version: !ruby/object:Gem::Version
4
+ version: 6.0.0.rc.6
5
+ platform: ruby
6
+ authors:
7
+ - David Heinemeier Hansson
8
+ - Gaurav Tiwari
9
+ - Justin Gordon
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2022-01-18 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: '5.2'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: '5.2'
29
+ - !ruby/object:Gem::Dependency
30
+ name: railties
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '5.2'
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '5.2'
43
+ - !ruby/object:Gem::Dependency
44
+ name: rack-proxy
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.6.1
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.6.1
57
+ - !ruby/object:Gem::Dependency
58
+ name: semantic_range
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 2.3.0
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 2.3.0
71
+ - !ruby/object:Gem::Dependency
72
+ name: bundler
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: 1.3.0
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 1.3.0
85
+ - !ruby/object:Gem::Dependency
86
+ name: rubocop
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ - !ruby/object:Gem::Dependency
100
+ name: rubocop-performance
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ description:
114
+ email:
115
+ - david@basecamp.com
116
+ - gaurav@gauravtiwari.co.uk
117
+ - justin@shakacode.com
118
+ executables: []
119
+ extensions: []
120
+ extra_rdoc_files: []
121
+ files:
122
+ - ".eslintignore"
123
+ - ".eslintrc.js"
124
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
125
+ - ".github/ISSUE_TEMPLATE/feature-request.md"
126
+ - ".github/workflows/jest.yml"
127
+ - ".github/workflows/js-lint.yml"
128
+ - ".github/workflows/rubocop.yml"
129
+ - ".github/workflows/ruby.yml"
130
+ - ".gitignore"
131
+ - ".node-version"
132
+ - ".rubocop.yml"
133
+ - CHANGELOG.md
134
+ - CONTRIBUTING.md
135
+ - Gemfile
136
+ - Gemfile.lock
137
+ - MIT-LICENSE
138
+ - README.md
139
+ - Rakefile
140
+ - config/README.md
141
+ - config/webpacker.yml
142
+ - docs/customizing_babel_config.md
143
+ - docs/deployment.md
144
+ - docs/developing_webpacker.md
145
+ - docs/troubleshooting.md
146
+ - docs/v6_upgrade.md
147
+ - gemfiles/Gemfile-rails-edge
148
+ - gemfiles/Gemfile-rails.5.2.x
149
+ - gemfiles/Gemfile-rails.6.0.x
150
+ - gemfiles/Gemfile-rails.6.1.x
151
+ - lib/install/application.js
152
+ - lib/install/bin/webpacker
153
+ - lib/install/bin/webpacker-dev-server
154
+ - lib/install/bin/yarn
155
+ - lib/install/binstubs.rb
156
+ - lib/install/config/webpack/webpack.config.js
157
+ - lib/install/config/webpacker.yml
158
+ - lib/install/package.json
159
+ - lib/install/template.rb
160
+ - lib/shakapacker/utils/git_utils.rb
161
+ - lib/shakapacker/utils/version_syntax_converter.rb
162
+ - lib/tasks/webpacker.rake
163
+ - lib/tasks/webpacker/binstubs.rake
164
+ - lib/tasks/webpacker/check_binstubs.rake
165
+ - lib/tasks/webpacker/check_node.rake
166
+ - lib/tasks/webpacker/check_yarn.rake
167
+ - lib/tasks/webpacker/clean.rake
168
+ - lib/tasks/webpacker/clobber.rake
169
+ - lib/tasks/webpacker/compile.rake
170
+ - lib/tasks/webpacker/info.rake
171
+ - lib/tasks/webpacker/install.rake
172
+ - lib/tasks/webpacker/verify_config.rake
173
+ - lib/tasks/webpacker/verify_install.rake
174
+ - lib/tasks/webpacker/yarn_install.rake
175
+ - lib/tasks/yarn.rake
176
+ - lib/webpacker.rb
177
+ - lib/webpacker/commands.rb
178
+ - lib/webpacker/compiler.rb
179
+ - lib/webpacker/configuration.rb
180
+ - lib/webpacker/dev_server.rb
181
+ - lib/webpacker/dev_server_proxy.rb
182
+ - lib/webpacker/dev_server_runner.rb
183
+ - lib/webpacker/env.rb
184
+ - lib/webpacker/helper.rb
185
+ - lib/webpacker/instance.rb
186
+ - lib/webpacker/manifest.rb
187
+ - lib/webpacker/railtie.rb
188
+ - lib/webpacker/runner.rb
189
+ - lib/webpacker/version.rb
190
+ - lib/webpacker/webpack_runner.rb
191
+ - package.json
192
+ - package/__tests__/config.js
193
+ - package/__tests__/dev_server.js
194
+ - package/__tests__/development.js
195
+ - package/__tests__/env.js
196
+ - package/__tests__/index.js
197
+ - package/__tests__/production.js
198
+ - package/__tests__/staging.js
199
+ - package/__tests__/test.js
200
+ - package/babel/preset.js
201
+ - package/config.js
202
+ - package/configPath.js
203
+ - package/dev_server.js
204
+ - package/env.js
205
+ - package/environments/__tests__/base.js
206
+ - package/environments/base.js
207
+ - package/environments/development.js
208
+ - package/environments/production.js
209
+ - package/environments/test.js
210
+ - package/index.js
211
+ - package/inliningCss.js
212
+ - package/rules/babel.js
213
+ - package/rules/coffee.js
214
+ - package/rules/css.js
215
+ - package/rules/erb.js
216
+ - package/rules/file.js
217
+ - package/rules/index.js
218
+ - package/rules/less.js
219
+ - package/rules/raw.js
220
+ - package/rules/sass.js
221
+ - package/rules/stylus.js
222
+ - package/utils/get_style_rule.js
223
+ - package/utils/helpers.js
224
+ - rakelib/release.rake
225
+ - test/command_test.rb
226
+ - test/compiler_test.rb
227
+ - test/configuration_test.rb
228
+ - test/dev_server_runner_test.rb
229
+ - test/dev_server_test.rb
230
+ - test/engine_rake_tasks_test.rb
231
+ - test/env_test.rb
232
+ - test/helper_test.rb
233
+ - test/manifest_test.rb
234
+ - test/mounted_app/Rakefile
235
+ - test/mounted_app/test/dummy/Rakefile
236
+ - test/mounted_app/test/dummy/bin/rails
237
+ - test/mounted_app/test/dummy/bin/rake
238
+ - test/mounted_app/test/dummy/config.ru
239
+ - test/mounted_app/test/dummy/config/application.rb
240
+ - test/mounted_app/test/dummy/config/environment.rb
241
+ - test/mounted_app/test/dummy/config/webpacker.yml
242
+ - test/mounted_app/test/dummy/package.json
243
+ - test/rake_tasks_test.rb
244
+ - test/test_app/Rakefile
245
+ - test/test_app/app/packs/entrypoints/application.js
246
+ - test/test_app/app/packs/entrypoints/multi_entry.css
247
+ - test/test_app/app/packs/entrypoints/multi_entry.js
248
+ - test/test_app/bin/webpacker
249
+ - test/test_app/bin/webpacker-dev-server
250
+ - test/test_app/config.ru
251
+ - test/test_app/config/application.rb
252
+ - test/test_app/config/environment.rb
253
+ - test/test_app/config/initializers/inspect_autoload_paths.rb
254
+ - test/test_app/config/webpack/webpack.config.js
255
+ - test/test_app/config/webpacker.yml
256
+ - test/test_app/config/webpacker_other_location.yml
257
+ - test/test_app/config/webpacker_public_root.yml
258
+ - test/test_app/package.json
259
+ - test/test_app/public/packs/manifest.json
260
+ - test/test_app/some.config.js
261
+ - test/test_app/yarn.lock
262
+ - test/test_helper.rb
263
+ - test/webpack_runner_test.rb
264
+ - test/webpacker_test.rb
265
+ - webpacker.gemspec
266
+ - yarn.lock
267
+ homepage: https://github.com/shakacode/shakapacker
268
+ licenses:
269
+ - MIT
270
+ metadata:
271
+ source_code_uri: https://github.com/shakacode/shakapacker/tree/v6.0.0-rc.6
272
+ post_install_message:
273
+ rdoc_options: []
274
+ require_paths:
275
+ - lib
276
+ required_ruby_version: !ruby/object:Gem::Requirement
277
+ requirements:
278
+ - - ">="
279
+ - !ruby/object:Gem::Version
280
+ version: 2.7.0
281
+ required_rubygems_version: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - ">"
284
+ - !ruby/object:Gem::Version
285
+ version: 1.3.1
286
+ requirements: []
287
+ rubygems_version: 3.2.32
288
+ signing_key:
289
+ specification_version: 4
290
+ summary: Use webpack to manage app-like JavaScript modules in Rails
291
+ test_files:
292
+ - test/command_test.rb
293
+ - test/compiler_test.rb
294
+ - test/configuration_test.rb
295
+ - test/dev_server_runner_test.rb
296
+ - test/dev_server_test.rb
297
+ - test/engine_rake_tasks_test.rb
298
+ - test/env_test.rb
299
+ - test/helper_test.rb
300
+ - test/manifest_test.rb
301
+ - test/mounted_app/Rakefile
302
+ - test/mounted_app/test/dummy/Rakefile
303
+ - test/mounted_app/test/dummy/bin/rails
304
+ - test/mounted_app/test/dummy/bin/rake
305
+ - test/mounted_app/test/dummy/config.ru
306
+ - test/mounted_app/test/dummy/config/application.rb
307
+ - test/mounted_app/test/dummy/config/environment.rb
308
+ - test/mounted_app/test/dummy/config/webpacker.yml
309
+ - test/mounted_app/test/dummy/package.json
310
+ - test/rake_tasks_test.rb
311
+ - test/test_app/Rakefile
312
+ - test/test_app/app/packs/entrypoints/application.js
313
+ - test/test_app/app/packs/entrypoints/multi_entry.css
314
+ - test/test_app/app/packs/entrypoints/multi_entry.js
315
+ - test/test_app/bin/webpacker
316
+ - test/test_app/bin/webpacker-dev-server
317
+ - test/test_app/config.ru
318
+ - test/test_app/config/application.rb
319
+ - test/test_app/config/environment.rb
320
+ - test/test_app/config/initializers/inspect_autoload_paths.rb
321
+ - test/test_app/config/webpack/webpack.config.js
322
+ - test/test_app/config/webpacker.yml
323
+ - test/test_app/config/webpacker_other_location.yml
324
+ - test/test_app/config/webpacker_public_root.yml
325
+ - test/test_app/package.json
326
+ - test/test_app/public/packs/manifest.json
327
+ - test/test_app/some.config.js
328
+ - test/test_app/yarn.lock
329
+ - test/test_helper.rb
330
+ - test/webpack_runner_test.rb
331
+ - test/webpacker_test.rb