jetpacker 0.4.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) 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 +58 -0
  7. data/.gitignore +1 -0
  8. data/.node-version +1 -1
  9. data/.rubocop.yml +113 -13
  10. data/.travis.yml +8 -21
  11. data/CHANGELOG.jetpacker.md +5 -0
  12. data/CHANGELOG.md +68 -2
  13. data/Gemfile +1 -0
  14. data/README.md +23 -649
  15. data/docs/css.md +58 -3
  16. data/docs/deployment.md +2 -2
  17. data/docs/docker.md +17 -17
  18. data/docs/engines.md +13 -0
  19. data/docs/env.md +0 -2
  20. data/docs/integrations.md +220 -0
  21. data/docs/target.md +22 -0
  22. data/docs/testing.md +2 -3
  23. data/docs/troubleshooting.md +3 -1
  24. data/docs/typescript.md +92 -28
  25. data/docs/webpack-dev-server.md +1 -1
  26. data/gemfiles/Gemfile-rails-edge +1 -1
  27. data/jetpacker.gemspec +4 -3
  28. data/lib/install/config/babel.config.js +13 -3
  29. data/lib/install/config/webpacker.yml +1 -4
  30. data/lib/install/examples/react/babel.config.js +12 -0
  31. data/lib/install/examples/react/tsconfig.json +2 -1
  32. data/lib/install/examples/typescript/tsconfig.json +2 -1
  33. data/lib/install/loaders/svelte.js +2 -2
  34. data/lib/install/template.rb +11 -3
  35. data/lib/install/typescript.rb +6 -2
  36. data/lib/jetpacker/version.rb +1 -1
  37. data/lib/tasks/webpacker/check_node.rake +15 -8
  38. data/lib/tasks/webpacker/check_yarn.rake +16 -10
  39. data/lib/tasks/webpacker/clean.rake +12 -8
  40. data/lib/tasks/webpacker/clobber.rake +8 -4
  41. data/lib/tasks/webpacker/yarn_install.rake +11 -16
  42. data/lib/webpacker/commands.rb +33 -9
  43. data/lib/webpacker/compiler.rb +9 -5
  44. data/lib/webpacker/configuration.rb +28 -13
  45. data/lib/webpacker/dev_server_proxy.rb +3 -1
  46. data/lib/webpacker/dev_server_runner.rb +2 -2
  47. data/lib/webpacker/env.rb +5 -1
  48. data/lib/webpacker/helper.rb +37 -18
  49. data/lib/webpacker/manifest.rb +4 -4
  50. data/lib/webpacker/railtie.rb +0 -43
  51. data/lib/webpacker/runner.rb +1 -0
  52. data/lib/webpacker/turbine.rb +0 -41
  53. data/lib/webpacker/version.rb +1 -1
  54. data/lib/webpacker/webpack_runner.rb +2 -2
  55. data/package/__tests__/config.js +12 -1
  56. data/package/__tests__/dev_server.js +2 -0
  57. data/package/__tests__/development.js +14 -1
  58. data/package/config.js +4 -1
  59. data/package/configPath.js +3 -0
  60. data/package/dev_server.js +1 -1
  61. data/package/env.js +1 -2
  62. data/package/environments/__tests__/base.js +29 -2
  63. data/package/environments/base.js +17 -7
  64. data/package/environments/development.js +39 -37
  65. data/package/environments/production.js +1 -3
  66. data/package/rules/babel.js +12 -5
  67. data/package/rules/file.js +3 -2
  68. data/package/rules/node_modules.js +1 -3
  69. data/package/rules/sass.js +10 -1
  70. data/package/utils/helpers.js +1 -1
  71. data/package.json +41 -41
  72. data/test/compiler_test.rb +8 -3
  73. data/test/configuration_test.rb +8 -7
  74. data/test/dev_server_runner_test.rb +1 -1
  75. data/test/helper_test.rb +24 -9
  76. data/test/manifest_test.rb +37 -6
  77. data/test/rake_tasks_test.rb +11 -0
  78. data/test/test_app/app/javascript/packs/multi_entry.css +4 -0
  79. data/test/test_app/app/javascript/packs/multi_entry.js +4 -0
  80. data/test/test_app/config/application.rb +0 -1
  81. data/test/test_app/config/webpacker.yml +7 -1
  82. data/test/test_app/public/packs/manifest.json +1 -0
  83. data/test/webpack_runner_test.rb +1 -1
  84. data/yarn.lock +3895 -3945
  85. metadata +35 -15
  86. data/Gemfile.lock +0 -171
  87. data/gemfiles/Gemfile-rails.4.2.x +0 -9
  88. data/gemfiles/Gemfile-rails.5.0.x +0 -9
  89. data/gemfiles/Gemfile-rails.5.1.x +0 -9
  90. 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.6.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: 2022-12-03 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"
@@ -111,7 +129,6 @@ files:
111
129
  - CHANGELOG.md
112
130
  - CONTRIBUTING.md
113
131
  - Gemfile
114
- - Gemfile.lock
115
132
  - MIT-LICENSE
116
133
  - README.md
117
134
  - Rakefile
@@ -124,8 +141,10 @@ files:
124
141
  - docs/env.md
125
142
  - docs/es6.md
126
143
  - docs/folder-structure.md
144
+ - docs/integrations.md
127
145
  - docs/misc.md
128
146
  - docs/props.md
147
+ - docs/target.md
129
148
  - docs/testing.md
130
149
  - docs/troubleshooting.md
131
150
  - docs/typescript.md
@@ -134,9 +153,6 @@ files:
134
153
  - docs/webpack.md
135
154
  - docs/yarn.md
136
155
  - 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
156
  - gemfiles/Gemfile-rails.5.2.x
141
157
  - gemfiles/Gemfile-rails.6.0.x
142
158
  - jetpacker.gemspec
@@ -180,7 +196,6 @@ files:
180
196
  - lib/install/loaders/elm.js
181
197
  - lib/install/loaders/erb.js
182
198
  - lib/install/loaders/svelte.js
183
- - lib/install/loaders/typescript.js
184
199
  - lib/install/loaders/vue.js
185
200
  - lib/install/react.rb
186
201
  - lib/install/stimulus.rb
@@ -229,6 +244,7 @@ files:
229
244
  - package/__tests__/staging.js
230
245
  - package/__tests__/test.js
231
246
  - package/config.js
247
+ - package/configPath.js
232
248
  - package/config_types/__tests__/config_list.js
233
249
  - package/config_types/__tests__/config_object.js
234
250
  - package/config_types/config_list.js
@@ -270,6 +286,8 @@ files:
270
286
  - test/rake_tasks_test.rb
271
287
  - test/test_app/Rakefile
272
288
  - test/test_app/app/javascript/packs/application.js
289
+ - test/test_app/app/javascript/packs/multi_entry.css
290
+ - test/test_app/app/javascript/packs/multi_entry.js
273
291
  - test/test_app/bin/webpack
274
292
  - test/test_app/bin/webpack-dev-server
275
293
  - test/test_app/config.ru
@@ -289,8 +307,8 @@ homepage: https://github.com/tongueroo/jetpacker
289
307
  licenses:
290
308
  - MIT
291
309
  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
310
+ source_code_uri: https://github.com/tongueroo/jetpacker/tree/v0.6.0
311
+ changelog_uri: https://github.com/tongueroo/jetpacker/blob/v0.6.0/CHANGELOG.md
294
312
  post_install_message:
295
313
  rdoc_options: []
296
314
  require_paths:
@@ -299,14 +317,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
299
317
  requirements:
300
318
  - - ">="
301
319
  - !ruby/object:Gem::Version
302
- version: 2.2.0
320
+ version: 2.4.0
303
321
  required_rubygems_version: !ruby/object:Gem::Requirement
304
322
  requirements:
305
323
  - - ">="
306
324
  - !ruby/object:Gem::Version
307
325
  version: '0'
308
326
  requirements: []
309
- rubygems_version: 3.1.2
327
+ rubygems_version: 3.3.10
310
328
  signing_key:
311
329
  specification_version: 4
312
330
  summary: Use webpack to manage app-like JavaScript modules in Jets
@@ -322,6 +340,8 @@ test_files:
322
340
  - test/rake_tasks_test.rb
323
341
  - test/test_app/Rakefile
324
342
  - test/test_app/app/javascript/packs/application.js
343
+ - test/test_app/app/javascript/packs/multi_entry.css
344
+ - test/test_app/app/javascript/packs/multi_entry.js
325
345
  - test/test_app/bin/webpack
326
346
  - test/test_app/bin/webpack-dev-server
327
347
  - test/test_app/config.ru
data/Gemfile.lock DELETED
@@ -1,171 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- webpacker (4.2.2)
5
- activesupport (>= 4.2)
6
- rack-proxy (>= 0.6.1)
7
- railties (>= 4.2)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actioncable (6.0.1)
13
- actionpack (= 6.0.1)
14
- nio4r (~> 2.0)
15
- websocket-driver (>= 0.6.1)
16
- actionmailbox (6.0.1)
17
- actionpack (= 6.0.1)
18
- activejob (= 6.0.1)
19
- activerecord (= 6.0.1)
20
- activestorage (= 6.0.1)
21
- activesupport (= 6.0.1)
22
- mail (>= 2.7.1)
23
- actionmailer (6.0.1)
24
- actionpack (= 6.0.1)
25
- actionview (= 6.0.1)
26
- activejob (= 6.0.1)
27
- mail (~> 2.5, >= 2.5.4)
28
- rails-dom-testing (~> 2.0)
29
- actionpack (6.0.1)
30
- actionview (= 6.0.1)
31
- activesupport (= 6.0.1)
32
- rack (~> 2.0)
33
- rack-test (>= 0.6.3)
34
- rails-dom-testing (~> 2.0)
35
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
36
- actiontext (6.0.1)
37
- actionpack (= 6.0.1)
38
- activerecord (= 6.0.1)
39
- activestorage (= 6.0.1)
40
- activesupport (= 6.0.1)
41
- nokogiri (>= 1.8.5)
42
- actionview (6.0.1)
43
- activesupport (= 6.0.1)
44
- builder (~> 3.1)
45
- erubi (~> 1.4)
46
- rails-dom-testing (~> 2.0)
47
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
48
- activejob (6.0.1)
49
- activesupport (= 6.0.1)
50
- globalid (>= 0.3.6)
51
- activemodel (6.0.1)
52
- activesupport (= 6.0.1)
53
- activerecord (6.0.1)
54
- activemodel (= 6.0.1)
55
- activesupport (= 6.0.1)
56
- activestorage (6.0.1)
57
- actionpack (= 6.0.1)
58
- activejob (= 6.0.1)
59
- activerecord (= 6.0.1)
60
- marcel (~> 0.3.1)
61
- activesupport (6.0.1)
62
- concurrent-ruby (~> 1.0, >= 1.0.2)
63
- i18n (>= 0.7, < 2)
64
- minitest (~> 5.1)
65
- tzinfo (~> 1.1)
66
- zeitwerk (~> 2.2)
67
- ast (2.4.0)
68
- builder (3.2.3)
69
- byebug (11.0.1)
70
- concurrent-ruby (1.1.5)
71
- crass (1.0.5)
72
- erubi (1.9.0)
73
- globalid (0.4.2)
74
- activesupport (>= 4.2.0)
75
- i18n (1.7.0)
76
- concurrent-ruby (~> 1.0)
77
- jaro_winkler (1.5.4)
78
- loofah (2.3.1)
79
- crass (~> 1.0.2)
80
- nokogiri (>= 1.5.9)
81
- mail (2.7.1)
82
- mini_mime (>= 0.1.1)
83
- marcel (0.3.3)
84
- mimemagic (~> 0.3.2)
85
- method_source (0.9.2)
86
- mimemagic (0.3.3)
87
- mini_mime (1.0.2)
88
- mini_portile2 (2.4.0)
89
- minitest (5.13.0)
90
- nio4r (2.5.2)
91
- nokogiri (1.10.5)
92
- mini_portile2 (~> 2.4.0)
93
- parallel (1.18.0)
94
- parser (2.6.5.0)
95
- ast (~> 2.4.0)
96
- rack (2.0.8)
97
- rack-proxy (0.6.5)
98
- rack
99
- rack-test (1.1.0)
100
- rack (>= 1.0, < 3)
101
- rails (6.0.1)
102
- actioncable (= 6.0.1)
103
- actionmailbox (= 6.0.1)
104
- actionmailer (= 6.0.1)
105
- actionpack (= 6.0.1)
106
- actiontext (= 6.0.1)
107
- actionview (= 6.0.1)
108
- activejob (= 6.0.1)
109
- activemodel (= 6.0.1)
110
- activerecord (= 6.0.1)
111
- activestorage (= 6.0.1)
112
- activesupport (= 6.0.1)
113
- bundler (>= 1.3.0)
114
- railties (= 6.0.1)
115
- sprockets-rails (>= 2.0.0)
116
- rails-dom-testing (2.0.3)
117
- activesupport (>= 4.2.0)
118
- nokogiri (>= 1.6)
119
- rails-html-sanitizer (1.3.0)
120
- loofah (~> 2.3)
121
- railties (6.0.1)
122
- actionpack (= 6.0.1)
123
- activesupport (= 6.0.1)
124
- method_source
125
- rake (>= 0.8.7)
126
- thor (>= 0.20.3, < 2.0)
127
- rainbow (3.0.0)
128
- rake (13.0.0)
129
- rubocop (0.68.1)
130
- jaro_winkler (~> 1.5.1)
131
- parallel (~> 1.10)
132
- parser (>= 2.5, != 2.5.1.1)
133
- rainbow (>= 2.2.2, < 4.0)
134
- ruby-progressbar (~> 1.7)
135
- unicode-display_width (>= 1.4.0, < 1.6)
136
- rubocop-performance (1.3.0)
137
- rubocop (>= 0.68.0)
138
- ruby-progressbar (1.10.1)
139
- sprockets (4.0.0)
140
- concurrent-ruby (~> 1.0)
141
- rack (> 1, < 3)
142
- sprockets-rails (3.2.1)
143
- actionpack (>= 4.0)
144
- activesupport (>= 4.0)
145
- sprockets (>= 3.0.0)
146
- thor (0.20.3)
147
- thread_safe (0.3.6)
148
- tzinfo (1.2.5)
149
- thread_safe (~> 0.1)
150
- unicode-display_width (1.5.0)
151
- websocket-driver (0.7.1)
152
- websocket-extensions (>= 0.1.0)
153
- websocket-extensions (0.1.4)
154
- zeitwerk (2.2.1)
155
-
156
- PLATFORMS
157
- ruby
158
-
159
- DEPENDENCIES
160
- bundler (>= 1.3.0)
161
- byebug
162
- minitest (~> 5.0)
163
- rack-proxy
164
- rails
165
- rake (>= 11.1)
166
- rubocop (< 0.69)
167
- rubocop-performance
168
- webpacker!
169
-
170
- BUNDLED WITH
171
- 1.17.3
@@ -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
- }