webpacker-pnpm 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitattributes +0 -0
- data/.github/FUNDING.yml +3 -0
- data/.github/workflows/ci.yaml +50 -0
- data/.gitignore +0 -0
- data/.rubocop.yml +4 -5
- data/CHANGELOG.md +69 -63
- data/Gemfile +8 -8
- data/LICENSE +29 -0
- data/README.md +33 -37
- data/Rakefile +11 -11
- data/bin/console +15 -15
- data/bin/setup +8 -8
- data/gemfiles/Gemfile-rails.5.2.x +0 -0
- data/gemfiles/Gemfile-rails.6.0.x +0 -0
- data/lib/webpacker/pnpm/patches.rb +61 -53
- data/lib/webpacker/pnpm/railtie.rb +33 -33
- data/lib/webpacker/pnpm/version.rb +9 -9
- data/lib/webpacker/pnpm.rb +5 -5
- data/lib/webpacker/tasks/check_pnpm.rake +42 -42
- data/lib/webpacker/tasks/env.rake +22 -22
- data/lib/webpacker/tasks/pnpm_install.rake +14 -14
- data/test/rake_tasks_test.rb +97 -97
- data/test/test_app/.gitignore +6 -6
- data/test/test_app/Rakefile +5 -5
- data/test/test_app/app/javascript/packs/application.js +10 -10
- data/test/test_app/app/javascript/packs/multi_entry.css +3 -3
- data/test/test_app/app/javascript/packs/multi_entry.js +4 -4
- data/test/test_app/bin/rails +0 -0
- data/test/test_app/bin/rake +0 -0
- data/test/test_app/bin/setup +0 -0
- data/test/test_app/bin/webpack +15 -15
- data/test/test_app/bin/webpack-dev-server +15 -15
- data/test/test_app/config/application.rb +13 -13
- data/test/test_app/config/boot.rb +5 -5
- data/test/test_app/config/environment.rb +6 -6
- data/test/test_app/config/webpack/development.js +0 -0
- data/test/test_app/config/webpack/environment.js +0 -0
- data/test/test_app/config/webpacker.yml +0 -0
- data/test/test_app/config/webpacker_public_root.yml +19 -19
- data/test/test_app/config.ru +7 -7
- data/test/test_app/package.json +0 -0
- data/test/test_app/pnpm-lock.yaml +0 -0
- data/test/test_app/public/packs/manifest.json +31 -31
- data/test/test_helper.rb +61 -61
- data/webpacker-pnpm.gemspec +44 -44
- metadata +9 -7
- data/.travis.yml +0 -42
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "semantic_range"
|
|
4
|
-
|
|
5
|
-
namespace :webpacker do
|
|
6
|
-
desc "Verifies if pnpm is installed"
|
|
7
|
-
task check_pnpm: [:environment] do
|
|
8
|
-
begin
|
|
9
|
-
$stdout.puts "Verifying pnpm version..."
|
|
10
|
-
|
|
11
|
-
pnpm_version = `pnpm --version`.chomp
|
|
12
|
-
raise Errno::ENOENT if pnpm_version.blank?
|
|
13
|
-
|
|
14
|
-
begin
|
|
15
|
-
pnpm_range = ">= 3.0.0"
|
|
16
|
-
is_unsupported = SemanticRange.satisfies?(pnpm_version, pnpm_range)
|
|
17
|
-
rescue StandardError
|
|
18
|
-
is_unsupported = false
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
unless is_unsupported
|
|
22
|
-
warn(
|
|
23
|
-
<<~HEREDOC.squish
|
|
24
|
-
Webpacker requires pnpm \"#{pnpm_range}\" and you are using #{pnpm_version}.
|
|
25
|
-
Please upgrade pnpm https://pnpm.js.org/en/installation/.
|
|
26
|
-
HEREDOC
|
|
27
|
-
)
|
|
28
|
-
warn("Exiting!")
|
|
29
|
-
exit!
|
|
30
|
-
end
|
|
31
|
-
rescue Errno::ENOENT
|
|
32
|
-
warn(
|
|
33
|
-
<<~HEREDOC.squish
|
|
34
|
-
pnpm is not installed. Please download and install pnpm from
|
|
35
|
-
https://pnpm.js.org/en/installation/.
|
|
36
|
-
HEREDOC
|
|
37
|
-
)
|
|
38
|
-
warn("Exiting!")
|
|
39
|
-
exit!
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "semantic_range"
|
|
4
|
+
|
|
5
|
+
namespace :webpacker do
|
|
6
|
+
desc "Verifies if pnpm is installed"
|
|
7
|
+
task check_pnpm: [:environment] do
|
|
8
|
+
begin
|
|
9
|
+
$stdout.puts "Verifying pnpm version..."
|
|
10
|
+
|
|
11
|
+
pnpm_version = `pnpm --version`.chomp
|
|
12
|
+
raise Errno::ENOENT if pnpm_version.blank?
|
|
13
|
+
|
|
14
|
+
begin
|
|
15
|
+
pnpm_range = ">= 3.0.0"
|
|
16
|
+
is_unsupported = SemanticRange.satisfies?(pnpm_version, pnpm_range)
|
|
17
|
+
rescue StandardError
|
|
18
|
+
is_unsupported = false
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
unless is_unsupported
|
|
22
|
+
warn(
|
|
23
|
+
<<~HEREDOC.squish
|
|
24
|
+
Webpacker requires pnpm \"#{pnpm_range}\" and you are using #{pnpm_version}.
|
|
25
|
+
Please upgrade pnpm https://pnpm.js.org/en/installation/.
|
|
26
|
+
HEREDOC
|
|
27
|
+
)
|
|
28
|
+
warn("Exiting!")
|
|
29
|
+
exit!
|
|
30
|
+
end
|
|
31
|
+
rescue Errno::ENOENT
|
|
32
|
+
warn(
|
|
33
|
+
<<~HEREDOC.squish
|
|
34
|
+
pnpm is not installed. Please download and install pnpm from
|
|
35
|
+
https://pnpm.js.org/en/installation/.
|
|
36
|
+
HEREDOC
|
|
37
|
+
)
|
|
38
|
+
warn("Exiting!")
|
|
39
|
+
exit!
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "webpacker/version"
|
|
4
|
-
|
|
5
|
-
namespace :webpacker do
|
|
6
|
-
desc "Provide information on Webpacker's current environment"
|
|
7
|
-
task env: [:environment] do
|
|
8
|
-
$stdout.puts "Ruby: #{`ruby --version`}"
|
|
9
|
-
$stdout.puts "Rails: #{Rails.version}"
|
|
10
|
-
$stdout.puts "Webpacker: #{Webpacker::VERSION}"
|
|
11
|
-
$stdout.puts "Node: #{`node --version`}"
|
|
12
|
-
$stdout.puts "pnpm: #{`pnpm --version`}"
|
|
13
|
-
|
|
14
|
-
$stdout.puts "\n"
|
|
15
|
-
$stdout.puts "@rails/webpacker: \n#{`npm list @rails/webpacker version`}"
|
|
16
|
-
|
|
17
|
-
$stdout.puts "Is bin/webpack present?: #{File.exist?("bin/webpack")}"
|
|
18
|
-
$stdout.puts <<~HEREDOC.squish
|
|
19
|
-
Is bin/webpack-dev-server present?: #{File.exist?("bin/webpack-dev-server")}
|
|
20
|
-
HEREDOC
|
|
21
|
-
end
|
|
22
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "webpacker/version"
|
|
4
|
+
|
|
5
|
+
namespace :webpacker do
|
|
6
|
+
desc "Provide information on Webpacker's current environment"
|
|
7
|
+
task env: [:environment] do
|
|
8
|
+
$stdout.puts "Ruby: #{`ruby --version`}"
|
|
9
|
+
$stdout.puts "Rails: #{Rails.version}"
|
|
10
|
+
$stdout.puts "Webpacker: #{Webpacker::VERSION}"
|
|
11
|
+
$stdout.puts "Node: #{`node --version`}"
|
|
12
|
+
$stdout.puts "pnpm: #{`pnpm --version`}"
|
|
13
|
+
|
|
14
|
+
$stdout.puts "\n"
|
|
15
|
+
$stdout.puts "@rails/webpacker: \n#{`npm list @rails/webpacker version`}"
|
|
16
|
+
|
|
17
|
+
$stdout.puts "Is bin/webpack present?: #{File.exist?("bin/webpack")}"
|
|
18
|
+
$stdout.puts <<~HEREDOC.squish
|
|
19
|
+
Is bin/webpack-dev-server present?: #{File.exist?("bin/webpack-dev-server")}
|
|
20
|
+
HEREDOC
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
namespace :webpacker do
|
|
4
|
-
desc "Install all JavaScript dependencies as specified via pnpm."
|
|
5
|
-
task pnpm_install: [:environment] do
|
|
6
|
-
valid_node_envs = ["test", "development", "production"]
|
|
7
|
-
|
|
8
|
-
node_env = ENV.fetch("NODE_ENV") do
|
|
9
|
-
valid_node_envs.include?(Rails.env) ? Rails.env : "production"
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
system({ "NODE_ENV" => node_env }, "pnpm i --frozen-lockfile --shamefully-hoist")
|
|
13
|
-
end
|
|
14
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
namespace :webpacker do
|
|
4
|
+
desc "Install all JavaScript dependencies as specified via pnpm."
|
|
5
|
+
task pnpm_install: [:environment] do
|
|
6
|
+
valid_node_envs = ["test", "development", "production"]
|
|
7
|
+
|
|
8
|
+
node_env = ENV.fetch("NODE_ENV") do
|
|
9
|
+
valid_node_envs.include?(Rails.env) ? Rails.env : "production"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
system({ "NODE_ENV" => node_env }, "pnpm i --frozen-lockfile --shamefully-hoist")
|
|
13
|
+
end
|
|
14
|
+
end
|
data/test/rake_tasks_test.rb
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "test_helper"
|
|
4
|
-
|
|
5
|
-
module Webpacker
|
|
6
|
-
module PNPM
|
|
7
|
-
class RakeTasksTest < Test
|
|
8
|
-
def test_rake_tasks
|
|
9
|
-
output = chdir_concurrent(test_path, "bundle exec rake --tasks")
|
|
10
|
-
assert_includes(output, "webpacker:check_pnpm")
|
|
11
|
-
assert_includes(output, "webpacker:pnpm_install")
|
|
12
|
-
assert_includes(output, "webpacker:env")
|
|
13
|
-
|
|
14
|
-
assert_not_includes(output, "webpacker:check_yarn")
|
|
15
|
-
assert_not_includes(output, "webpacker:yarn_install")
|
|
16
|
-
assert_not_includes(output, "yarn:install")
|
|
17
|
-
assert_not_includes(output, "webpacker:info")
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def test_check_pnpm_version
|
|
21
|
-
output = chdir_concurrent(test_path, "rake webpacker:check_pnpm")
|
|
22
|
-
assert_not_includes(output, "pnpm is not installed")
|
|
23
|
-
assert_not_includes(output, "Webpacker requires pnpm")
|
|
24
|
-
|
|
25
|
-
assert_includes(output, "Verifying pnpm version...")
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def test_override_check_yarn_version
|
|
29
|
-
output = chdir_concurrent(test_path, "rake webpacker:check_yarn")
|
|
30
|
-
assert_not_includes(output, "pnpm is not installed")
|
|
31
|
-
assert_not_includes(output, "Webpacker requires pnpm")
|
|
32
|
-
|
|
33
|
-
assert_includes(output, "Verifying pnpm version...")
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def test_pnpm_install_in_production_env
|
|
37
|
-
cmd = "bundle exec rake webpacker:pnpm_install"
|
|
38
|
-
chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
|
39
|
-
{ isolated: true }) do |temp|
|
|
40
|
-
assert_not_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
|
41
|
-
Expected only production dependencies to be installed
|
|
42
|
-
HEREDOC
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def test_pnpm_install_in_test_env
|
|
47
|
-
assert_includes(test_app_dev_dependencies, "right-pad")
|
|
48
|
-
|
|
49
|
-
cmd = "bundle exec rake webpacker:pnpm_install"
|
|
50
|
-
chdir_concurrent(test_path, cmd, { "NODE_ENV": "test" },
|
|
51
|
-
{ isolated: true }) do |temp|
|
|
52
|
-
assert_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
|
53
|
-
Expected dev dependencies to be installed
|
|
54
|
-
HEREDOC
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def test_yarn_install_alias_in_production_env
|
|
59
|
-
cmd = "bundle exec rake webpacker:yarn_install"
|
|
60
|
-
chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
|
61
|
-
{ isolated: true }) do |temp|
|
|
62
|
-
assert_not_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
|
63
|
-
Expected only production dependencies to be installed
|
|
64
|
-
HEREDOC
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
def test_yarn_install_alias_in_test_env
|
|
69
|
-
assert_includes(test_app_dev_dependencies, "right-pad")
|
|
70
|
-
|
|
71
|
-
cmd = "bundle exec rake webpacker:yarn_install"
|
|
72
|
-
chdir_concurrent(test_path, cmd, { "NODE_ENV": "test" },
|
|
73
|
-
{ isolated: true }) do |temp|
|
|
74
|
-
assert_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
|
75
|
-
Expected dev dependencies to be installed
|
|
76
|
-
HEREDOC
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
private
|
|
81
|
-
|
|
82
|
-
def test_path
|
|
83
|
-
File.expand_path("test_app", __dir__)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
def test_app_dev_dependencies
|
|
87
|
-
package_json = File.expand_path("package.json", test_path)
|
|
88
|
-
JSON.parse(File.read(package_json))["devDependencies"]
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
def installed_node_modules(dir)
|
|
92
|
-
node_modules_path = File.expand_path("node_modules", dir)
|
|
93
|
-
Dir.entries(node_modules_path)
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "test_helper"
|
|
4
|
+
|
|
5
|
+
module Webpacker
|
|
6
|
+
module PNPM
|
|
7
|
+
class RakeTasksTest < Test
|
|
8
|
+
def test_rake_tasks
|
|
9
|
+
output = chdir_concurrent(test_path, "bundle exec rake --tasks")
|
|
10
|
+
assert_includes(output, "webpacker:check_pnpm")
|
|
11
|
+
assert_includes(output, "webpacker:pnpm_install")
|
|
12
|
+
assert_includes(output, "webpacker:env")
|
|
13
|
+
|
|
14
|
+
assert_not_includes(output, "webpacker:check_yarn")
|
|
15
|
+
assert_not_includes(output, "webpacker:yarn_install")
|
|
16
|
+
assert_not_includes(output, "yarn:install")
|
|
17
|
+
assert_not_includes(output, "webpacker:info")
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def test_check_pnpm_version
|
|
21
|
+
output = chdir_concurrent(test_path, "rake webpacker:check_pnpm")
|
|
22
|
+
assert_not_includes(output, "pnpm is not installed")
|
|
23
|
+
assert_not_includes(output, "Webpacker requires pnpm")
|
|
24
|
+
|
|
25
|
+
assert_includes(output, "Verifying pnpm version...")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def test_override_check_yarn_version
|
|
29
|
+
output = chdir_concurrent(test_path, "rake webpacker:check_yarn")
|
|
30
|
+
assert_not_includes(output, "pnpm is not installed")
|
|
31
|
+
assert_not_includes(output, "Webpacker requires pnpm")
|
|
32
|
+
|
|
33
|
+
assert_includes(output, "Verifying pnpm version...")
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def test_pnpm_install_in_production_env
|
|
37
|
+
cmd = "bundle exec rake webpacker:pnpm_install"
|
|
38
|
+
chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
|
39
|
+
{ isolated: true }) do |temp|
|
|
40
|
+
assert_not_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
|
41
|
+
Expected only production dependencies to be installed
|
|
42
|
+
HEREDOC
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def test_pnpm_install_in_test_env
|
|
47
|
+
assert_includes(test_app_dev_dependencies, "right-pad")
|
|
48
|
+
|
|
49
|
+
cmd = "bundle exec rake webpacker:pnpm_install"
|
|
50
|
+
chdir_concurrent(test_path, cmd, { "NODE_ENV": "test" },
|
|
51
|
+
{ isolated: true }) do |temp|
|
|
52
|
+
assert_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
|
53
|
+
Expected dev dependencies to be installed
|
|
54
|
+
HEREDOC
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def test_yarn_install_alias_in_production_env
|
|
59
|
+
cmd = "bundle exec rake webpacker:yarn_install"
|
|
60
|
+
chdir_concurrent(test_path, cmd, { "NODE_ENV": "production" },
|
|
61
|
+
{ isolated: true }) do |temp|
|
|
62
|
+
assert_not_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
|
63
|
+
Expected only production dependencies to be installed
|
|
64
|
+
HEREDOC
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def test_yarn_install_alias_in_test_env
|
|
69
|
+
assert_includes(test_app_dev_dependencies, "right-pad")
|
|
70
|
+
|
|
71
|
+
cmd = "bundle exec rake webpacker:yarn_install"
|
|
72
|
+
chdir_concurrent(test_path, cmd, { "NODE_ENV": "test" },
|
|
73
|
+
{ isolated: true }) do |temp|
|
|
74
|
+
assert_includes installed_node_modules(temp), "right-pad", <<~HEREDOC
|
|
75
|
+
Expected dev dependencies to be installed
|
|
76
|
+
HEREDOC
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
private
|
|
81
|
+
|
|
82
|
+
def test_path
|
|
83
|
+
File.expand_path("test_app", __dir__)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def test_app_dev_dependencies
|
|
87
|
+
package_json = File.expand_path("package.json", test_path)
|
|
88
|
+
JSON.parse(File.read(package_json))["devDependencies"]
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def installed_node_modules(dir)
|
|
92
|
+
node_modules_path = File.expand_path("node_modules", dir)
|
|
93
|
+
Dir.entries(node_modules_path)
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
data/test/test_app/.gitignore
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/.bundle/
|
|
2
|
-
/coverage/
|
|
3
|
-
/doc/
|
|
4
|
-
/pkg/
|
|
5
|
-
/spec/reports/
|
|
6
|
-
/tmp/
|
|
1
|
+
/.bundle/
|
|
2
|
+
/coverage/
|
|
3
|
+
/doc/
|
|
4
|
+
/pkg/
|
|
5
|
+
/spec/reports/
|
|
6
|
+
/tmp/
|
|
7
7
|
/node_modules
|
data/test/test_app/Rakefile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "config/application"
|
|
4
|
-
|
|
5
|
-
Rails.application.load_tasks
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "config/application"
|
|
4
|
+
|
|
5
|
+
Rails.application.load_tasks
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* eslint no-console:0 */
|
|
2
|
-
// This file is automatically compiled by Webpack, along with any other files
|
|
3
|
-
// present in this directory. You're encouraged to place your actual application logic in
|
|
4
|
-
// a relevant structure within app/javascript and only use these pack files to reference
|
|
5
|
-
// that code so it'll be compiled.
|
|
6
|
-
//
|
|
7
|
-
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
|
|
8
|
-
// layout file, like app/views/layouts/application.html.erb
|
|
9
|
-
|
|
10
|
-
console.log('"Hello Sanity" from webpacker-pnpm!')
|
|
1
|
+
/* eslint no-console:0 */
|
|
2
|
+
// This file is automatically compiled by Webpack, along with any other files
|
|
3
|
+
// present in this directory. You're encouraged to place your actual application logic in
|
|
4
|
+
// a relevant structure within app/javascript and only use these pack files to reference
|
|
5
|
+
// that code so it'll be compiled.
|
|
6
|
+
//
|
|
7
|
+
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
|
|
8
|
+
// layout file, like app/views/layouts/application.html.erb
|
|
9
|
+
|
|
10
|
+
console.log('"Hello Sanity" from webpacker-pnpm!')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Dummy file #1 for Multi File Entry points: https://webpack.js.org/guides/entry-advanced/
|
|
3
|
-
* This file must be named the same
|
|
1
|
+
/*
|
|
2
|
+
* Dummy file #1 for Multi File Entry points: https://webpack.js.org/guides/entry-advanced/
|
|
3
|
+
* This file must be named the same
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Dummy file #2 for Multi File Entry points: https://webpack.js.org/guides/entry-advanced/
|
|
3
|
-
* This file must be named the same
|
|
4
|
-
*/
|
|
1
|
+
/*
|
|
2
|
+
* Dummy file #2 for Multi File Entry points: https://webpack.js.org/guides/entry-advanced/
|
|
3
|
+
* This file must be named the same
|
|
4
|
+
*/
|
data/test/test_app/bin/rails
CHANGED
|
File without changes
|
data/test/test_app/bin/rake
CHANGED
|
File without changes
|
data/test/test_app/bin/setup
CHANGED
|
File without changes
|
data/test/test_app/bin/webpack
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
|
5
|
-
ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
|
|
6
|
-
|
|
7
|
-
require "pathname"
|
|
8
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
9
|
-
Pathname.new(__FILE__).realpath)
|
|
10
|
-
|
|
11
|
-
require "bundler/setup"
|
|
12
|
-
|
|
13
|
-
require "webpacker"
|
|
14
|
-
require "webpacker/webpack_runner"
|
|
15
|
-
Webpacker::WebpackRunner.run(ARGV)
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
|
5
|
+
ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
|
|
6
|
+
|
|
7
|
+
require "pathname"
|
|
8
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
9
|
+
Pathname.new(__FILE__).realpath)
|
|
10
|
+
|
|
11
|
+
require "bundler/setup"
|
|
12
|
+
|
|
13
|
+
require "webpacker"
|
|
14
|
+
require "webpacker/webpack_runner"
|
|
15
|
+
Webpacker::WebpackRunner.run(ARGV)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
|
5
|
-
ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
|
|
6
|
-
|
|
7
|
-
require "pathname"
|
|
8
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
9
|
-
Pathname.new(__FILE__).realpath)
|
|
10
|
-
|
|
11
|
-
require "bundler/setup"
|
|
12
|
-
|
|
13
|
-
require "webpacker"
|
|
14
|
-
require "webpacker/dev_server_runner"
|
|
15
|
-
Webpacker::DevServerRunner.run(ARGV)
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
|
5
|
+
ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
|
|
6
|
+
|
|
7
|
+
require "pathname"
|
|
8
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
9
|
+
Pathname.new(__FILE__).realpath)
|
|
10
|
+
|
|
11
|
+
require "bundler/setup"
|
|
12
|
+
|
|
13
|
+
require "webpacker"
|
|
14
|
+
require "webpacker/dev_server_runner"
|
|
15
|
+
Webpacker::DevServerRunner.run(ARGV)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "action_controller/railtie"
|
|
4
|
-
require "action_view/railtie"
|
|
5
|
-
require "webpacker"
|
|
6
|
-
require "webpacker/pnpm"
|
|
7
|
-
|
|
8
|
-
module TestApp
|
|
9
|
-
class Application < ::Rails::Application
|
|
10
|
-
config.secret_key_base = "abcdef"
|
|
11
|
-
config.eager_load = true
|
|
12
|
-
end
|
|
13
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "action_controller/railtie"
|
|
4
|
+
require "action_view/railtie"
|
|
5
|
+
require "webpacker"
|
|
6
|
+
require "webpacker/pnpm"
|
|
7
|
+
|
|
8
|
+
module TestApp
|
|
9
|
+
class Application < ::Rails::Application
|
|
10
|
+
config.secret_key_base = "abcdef"
|
|
11
|
+
config.eager_load = true
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
4
|
-
|
|
5
|
-
require "bundler/setup" # Set up gems listed in the Gemfile.
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
4
|
+
|
|
5
|
+
require "bundler/setup" # Set up gems listed in the Gemfile.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "application"
|
|
4
|
-
|
|
5
|
-
Rails.backtrace_cleaner.remove_silencers!
|
|
6
|
-
Rails.application.initialize!
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "application"
|
|
4
|
+
|
|
5
|
+
Rails.backtrace_cleaner.remove_silencers!
|
|
6
|
+
Rails.application.initialize!
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
|
2
|
-
|
|
3
|
-
default: &default
|
|
4
|
-
public_root_path: ../public
|
|
5
|
-
|
|
6
|
-
development:
|
|
7
|
-
<<: *default
|
|
8
|
-
compile: true
|
|
9
|
-
|
|
10
|
-
test:
|
|
11
|
-
<<: *default
|
|
12
|
-
compile: true
|
|
13
|
-
public_output_path: packs-test
|
|
14
|
-
|
|
15
|
-
production:
|
|
16
|
-
<<: *default
|
|
17
|
-
compile: false
|
|
18
|
-
extract_css: true
|
|
19
|
-
cache_manifest: true
|
|
1
|
+
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
|
2
|
+
|
|
3
|
+
default: &default
|
|
4
|
+
public_root_path: ../public
|
|
5
|
+
|
|
6
|
+
development:
|
|
7
|
+
<<: *default
|
|
8
|
+
compile: true
|
|
9
|
+
|
|
10
|
+
test:
|
|
11
|
+
<<: *default
|
|
12
|
+
compile: true
|
|
13
|
+
public_output_path: packs-test
|
|
14
|
+
|
|
15
|
+
production:
|
|
16
|
+
<<: *default
|
|
17
|
+
compile: false
|
|
18
|
+
extract_css: true
|
|
19
|
+
cache_manifest: true
|
data/test/test_app/config.ru
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# This file allows the `Rails.root` to be correctly determined.
|
|
4
|
-
|
|
5
|
-
require_relative "config/environment"
|
|
6
|
-
|
|
7
|
-
run(Rails.application)
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file allows the `Rails.root` to be correctly determined.
|
|
4
|
+
|
|
5
|
+
require_relative "config/environment"
|
|
6
|
+
|
|
7
|
+
run(Rails.application)
|
data/test/test_app/package.json
CHANGED
|
File without changes
|
|
File without changes
|