jetpacker 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +8 -8
  3. data/.github/workflows/jest.yml +38 -0
  4. data/.github/workflows/js-lint.yml +39 -0
  5. data/.github/workflows/rubocop.yml +39 -0
  6. data/.github/workflows/ruby.yml +70 -0
  7. data/.node-version +1 -1
  8. data/.travis.yml +8 -21
  9. data/CHANGELOG.jetpacker.md +5 -0
  10. data/CHANGELOG.md +44 -2
  11. data/Gemfile +1 -0
  12. data/Gemfile.lock +115 -101
  13. data/README.md +23 -649
  14. data/docs/css.md +58 -3
  15. data/docs/deployment.md +2 -2
  16. data/docs/docker.md +17 -17
  17. data/docs/engines.md +13 -0
  18. data/docs/env.md +0 -2
  19. data/docs/integrations.md +220 -0
  20. data/docs/target.md +22 -0
  21. data/docs/testing.md +2 -3
  22. data/docs/troubleshooting.md +3 -1
  23. data/docs/typescript.md +92 -28
  24. data/docs/webpack-dev-server.md +1 -1
  25. data/jetpacker.gemspec +4 -3
  26. data/lib/install/config/babel.config.js +1 -3
  27. data/lib/install/config/webpacker.yml +1 -4
  28. data/lib/install/examples/react/tsconfig.json +2 -1
  29. data/lib/install/examples/typescript/tsconfig.json +2 -1
  30. data/lib/install/loaders/svelte.js +2 -2
  31. data/lib/install/template.rb +1 -1
  32. data/lib/install/typescript.rb +5 -1
  33. data/lib/jetpacker/version.rb +1 -1
  34. data/lib/tasks/webpacker/check_node.rake +15 -8
  35. data/lib/tasks/webpacker/check_yarn.rake +17 -10
  36. data/lib/tasks/webpacker/clean.rake +12 -8
  37. data/lib/tasks/webpacker/clobber.rake +8 -4
  38. data/lib/tasks/webpacker/yarn_install.rake +5 -16
  39. data/lib/webpacker/commands.rb +33 -9
  40. data/lib/webpacker/compiler.rb +9 -5
  41. data/lib/webpacker/configuration.rb +13 -9
  42. data/lib/webpacker/dev_server_proxy.rb +3 -1
  43. data/lib/webpacker/dev_server_runner.rb +2 -2
  44. data/lib/webpacker/helper.rb +37 -18
  45. data/lib/webpacker/manifest.rb +4 -4
  46. data/lib/webpacker/railtie.rb +0 -43
  47. data/lib/webpacker/runner.rb +1 -0
  48. data/lib/webpacker/turbine.rb +0 -41
  49. data/lib/webpacker/version.rb +1 -1
  50. data/lib/webpacker/webpack_runner.rb +2 -2
  51. data/package.json +39 -39
  52. data/package/__tests__/config.js +12 -1
  53. data/package/__tests__/dev_server.js +2 -0
  54. data/package/__tests__/development.js +14 -1
  55. data/package/config.js +4 -1
  56. data/package/configPath.js +3 -0
  57. data/package/dev_server.js +1 -1
  58. data/package/env.js +1 -2
  59. data/package/environments/__tests__/base.js +29 -2
  60. data/package/environments/base.js +17 -7
  61. data/package/environments/development.js +39 -37
  62. data/package/environments/production.js +1 -3
  63. data/package/rules/babel.js +12 -5
  64. data/package/rules/file.js +1 -0
  65. data/package/rules/node_modules.js +1 -3
  66. data/package/rules/sass.js +7 -1
  67. data/package/utils/helpers.js +1 -1
  68. data/test/compiler_test.rb +8 -3
  69. data/test/configuration_test.rb +8 -7
  70. data/test/dev_server_runner_test.rb +1 -1
  71. data/test/helper_test.rb +3 -0
  72. data/test/manifest_test.rb +37 -6
  73. data/test/rake_tasks_test.rb +11 -0
  74. data/test/test_app/app/javascript/packs/multi_entry.css +4 -0
  75. data/test/test_app/app/javascript/packs/multi_entry.js +4 -0
  76. data/test/test_app/config/application.rb +0 -1
  77. data/test/test_app/config/webpacker.yml +7 -1
  78. data/test/test_app/public/packs/manifest.json +1 -0
  79. data/test/webpack_runner_test.rb +1 -1
  80. data/yarn.lock +3405 -2836
  81. metadata +35 -14
  82. data/gemfiles/Gemfile-rails.4.2.x +0 -9
  83. data/gemfiles/Gemfile-rails.5.0.x +0 -9
  84. data/gemfiles/Gemfile-rails.5.1.x +0 -9
  85. data/lib/install/loaders/typescript.js +0 -11
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jetpacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-17 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
19
+ version: '5.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.2'
26
+ version: '5.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '4.2'
33
+ version: '5.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '4.2'
40
+ version: '5.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack-proxy
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.6.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: semantic_range
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 2.3.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 2.3.0
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +117,10 @@ extra_rdoc_files: []
103
117
  files:
104
118
  - ".eslintignore"
105
119
  - ".eslintrc.js"
120
+ - ".github/workflows/jest.yml"
121
+ - ".github/workflows/js-lint.yml"
122
+ - ".github/workflows/rubocop.yml"
123
+ - ".github/workflows/ruby.yml"
106
124
  - ".gitignore"
107
125
  - ".node-version"
108
126
  - ".rubocop.yml"
@@ -124,8 +142,10 @@ files:
124
142
  - docs/env.md
125
143
  - docs/es6.md
126
144
  - docs/folder-structure.md
145
+ - docs/integrations.md
127
146
  - docs/misc.md
128
147
  - docs/props.md
148
+ - docs/target.md
129
149
  - docs/testing.md
130
150
  - docs/troubleshooting.md
131
151
  - docs/typescript.md
@@ -134,9 +154,6 @@ files:
134
154
  - docs/webpack.md
135
155
  - docs/yarn.md
136
156
  - gemfiles/Gemfile-rails-edge
137
- - gemfiles/Gemfile-rails.4.2.x
138
- - gemfiles/Gemfile-rails.5.0.x
139
- - gemfiles/Gemfile-rails.5.1.x
140
157
  - gemfiles/Gemfile-rails.5.2.x
141
158
  - gemfiles/Gemfile-rails.6.0.x
142
159
  - jetpacker.gemspec
@@ -180,7 +197,6 @@ files:
180
197
  - lib/install/loaders/elm.js
181
198
  - lib/install/loaders/erb.js
182
199
  - lib/install/loaders/svelte.js
183
- - lib/install/loaders/typescript.js
184
200
  - lib/install/loaders/vue.js
185
201
  - lib/install/react.rb
186
202
  - lib/install/stimulus.rb
@@ -229,6 +245,7 @@ files:
229
245
  - package/__tests__/staging.js
230
246
  - package/__tests__/test.js
231
247
  - package/config.js
248
+ - package/configPath.js
232
249
  - package/config_types/__tests__/config_list.js
233
250
  - package/config_types/__tests__/config_object.js
234
251
  - package/config_types/config_list.js
@@ -270,6 +287,8 @@ files:
270
287
  - test/rake_tasks_test.rb
271
288
  - test/test_app/Rakefile
272
289
  - test/test_app/app/javascript/packs/application.js
290
+ - test/test_app/app/javascript/packs/multi_entry.css
291
+ - test/test_app/app/javascript/packs/multi_entry.js
273
292
  - test/test_app/bin/webpack
274
293
  - test/test_app/bin/webpack-dev-server
275
294
  - test/test_app/config.ru
@@ -289,8 +308,8 @@ homepage: https://github.com/tongueroo/jetpacker
289
308
  licenses:
290
309
  - MIT
291
310
  metadata:
292
- source_code_uri: https://github.com/tongueroo/jetpacker/tree/v0.4.2
293
- changelog_uri: https://github.com/tongueroo/jetpacker/blob/v0.4.2/CHANGELOG.md
311
+ source_code_uri: https://github.com/tongueroo/jetpacker/tree/v0.5.0
312
+ changelog_uri: https://github.com/tongueroo/jetpacker/blob/v0.5.0/CHANGELOG.md
294
313
  post_install_message:
295
314
  rdoc_options: []
296
315
  require_paths:
@@ -299,14 +318,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
299
318
  requirements:
300
319
  - - ">="
301
320
  - !ruby/object:Gem::Version
302
- version: 2.2.0
321
+ version: 2.4.0
303
322
  required_rubygems_version: !ruby/object:Gem::Requirement
304
323
  requirements:
305
324
  - - ">="
306
325
  - !ruby/object:Gem::Version
307
326
  version: '0'
308
327
  requirements: []
309
- rubygems_version: 3.1.2
328
+ rubygems_version: 3.1.4
310
329
  signing_key:
311
330
  specification_version: 4
312
331
  summary: Use webpack to manage app-like JavaScript modules in Jets
@@ -322,6 +341,8 @@ test_files:
322
341
  - test/rake_tasks_test.rb
323
342
  - test/test_app/Rakefile
324
343
  - test/test_app/app/javascript/packs/application.js
344
+ - test/test_app/app/javascript/packs/multi_entry.css
345
+ - test/test_app/app/javascript/packs/multi_entry.js
325
346
  - test/test_app/bin/webpack
326
347
  - test/test_app/bin/webpack-dev-server
327
348
  - test/test_app/config.ru
@@ -1,9 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: "../"
4
-
5
- gem "rails", "~> 4.2.0"
6
- gem "rake", ">= 11.1"
7
- gem "rack-proxy", require: false
8
- gem "minitest", "~> 5.0"
9
- gem "byebug"
@@ -1,9 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: "../"
4
-
5
- gem "rails", "~> 5.0.0"
6
- gem "rake", ">= 11.1"
7
- gem "rack-proxy", require: false
8
- gem "minitest", "~> 5.0"
9
- gem "byebug"
@@ -1,9 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: "../"
4
-
5
- gem "rails", "~> 5.1.0"
6
- gem "rake", ">= 11.1"
7
- gem "rack-proxy", require: false
8
- gem "minitest", "~> 5.0"
9
- gem "byebug"
@@ -1,11 +0,0 @@
1
- const PnpWebpackPlugin = require('pnp-webpack-plugin')
2
-
3
- module.exports = {
4
- test: /\.tsx?(\.erb)?$/,
5
- use: [
6
- {
7
- loader: 'ts-loader',
8
- options: PnpWebpackPlugin.tsLoaderOptions()
9
- }
10
- ]
11
- }