88
99Bundler ::GemHelper . install_tasks
1010
11- def require_package_json_gem
12- require "bundler/inline"
13-
14- gemfile { gem "package_json" , github : "G-Rath/package_json" , branch : "add-bun-support" }
15-
16- puts "using package_json v#{ PackageJson ::VERSION } "
17- end
11+ require "package_json"
1812
1913def copy_react_asset ( webpack_file , destination_file )
2014 full_webpack_path = File . expand_path ( "../react-builds/build/#{ webpack_file } " , __FILE__ )
@@ -28,15 +22,11 @@ namespace :react do
2822
2923 desc "Install the JavaScript dependencies"
3024 task :install do
31- require_package_json_gem
32-
3325 PackageJson . read ( "react-builds" ) . manager . install
3426 end
3527
3628 desc "Build the JS bundles with Webpack"
3729 task :build do
38- require_package_json_gem
39-
4030 PackageJson . read ( "react-builds" ) . manager . run ( "build" )
4131 end
4232
@@ -56,15 +46,11 @@ namespace :ujs do
5646
5747 desc "Install the JavaScript dependencies"
5848 task :install do
59- require_package_json_gem
60-
6149 PackageJson . read . manager . install
6250 end
6351
6452 desc "Build the JS bundles with Webpack"
6553 task :build do
66- require_package_json_gem
67-
6854 PackageJson . read . manager . run ( "build" )
6955 end
7056
@@ -96,8 +82,6 @@ task default: :test
9682
9783task :test_setup do
9884 Dir . chdir ( "./test/dummy" ) do
99- require_package_json_gem
100-
10185 PackageJson . read . manager . install
10286 end
10387end
0 commit comments