File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,6 @@ def copy_react_asset(webpack_file, destination_file)
1212 FileUtils . cp ( full_webpack_path , full_destination_path )
1313end
1414
15- # Move to `dirname` and execute `yarn {cmd}`
16- def yarn_run_in ( dirname , cmd )
17- Dir . chdir ( dirname ) do
18- `yarn #{ cmd } `
19- end
20- end
21-
2215namespace :react do
2316 desc 'Run the JS build process to put files in the gem source'
2417 task update : [ :install , :build , :copy ]
@@ -49,12 +42,12 @@ namespace :ujs do
4942
5043 desc 'Install the JavaScript dependencies'
5144 task :install do
52- yarn_run_in ( 'react_ujs' , ' upgrade' )
45+ `yarn upgrade`
5346 end
5447
5548 desc 'Build the JS bundles with Webpack'
5649 task :build do
57- yarn_run_in ( 'react_ujs' , ' build' )
50+ `yarn build`
5851 end
5952
6053 desc "Copy browser-ready JS files to the gem's asset paths"
@@ -66,9 +59,7 @@ namespace :ujs do
6659
6760 desc 'Publish the package in ./react_ujs/ to npm as `react_ujs`'
6861 task publish : :update do
69- Dir . chdir ( 'react_ujs' ) do
70- `npm publish`
71- end
62+ `npm publish`
7263 end
7364end
7465
Original file line number Diff line number Diff line change 22 "name" : " react_ujs" ,
33 "version" : " 2.3.1" ,
44 "description" : " Rails UJS for the react-rails gem" ,
5- "main" : " index.js" ,
5+ "main" : " react_ujs/index.js" ,
6+ "files" : [
7+ " react_ujs"
8+ ],
69 "repository" : " reactjs/react-rails" ,
710 "scripts" : {
8- "build" : " webpack"
11+ "build" : " cd react_ujs && webpack"
912 },
1013 "devDependencies" : {
1114 "webpack" : " ^2.3.3"
File renamed without changes.
You can’t perform that action at this time.
0 commit comments