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)
12
12
FileUtils . cp ( full_webpack_path , full_destination_path )
13
13
end
14
14
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
-
22
15
namespace :react do
23
16
desc 'Run the JS build process to put files in the gem source'
24
17
task update : [ :install , :build , :copy ]
@@ -54,12 +47,12 @@ namespace :ujs do
54
47
55
48
desc 'Install the JavaScript dependencies'
56
49
task :install do
57
- yarn_run_in ( 'react_ujs' , ' upgrade' )
50
+ `yarn upgrade`
58
51
end
59
52
60
53
desc 'Build the JS bundles with Webpack'
61
54
task :build do
62
- yarn_run_in ( 'react_ujs' , ' build' )
55
+ `yarn build`
63
56
end
64
57
65
58
desc "Copy browser-ready JS files to the gem's asset paths"
@@ -71,9 +64,7 @@ namespace :ujs do
71
64
72
65
desc 'Publish the package in ./react_ujs/ to npm as `react_ujs`'
73
66
task publish : :update do
74
- Dir . chdir ( 'react_ujs' ) do
75
- `npm publish`
76
- end
67
+ `npm publish`
77
68
end
78
69
end
79
70
Original file line number Diff line number Diff line change 2
2
"name" : " react_ujs" ,
3
3
"version" : " 2.3.1" ,
4
4
"description" : " Rails UJS for the react-rails gem" ,
5
- "main" : " index.js" ,
5
+ "main" : " react_ujs/index.js" ,
6
+ "files" : [
7
+ " react_ujs"
8
+ ],
6
9
"repository" : " reactjs/react-rails" ,
7
10
"scripts" : {
8
- "build" : " webpack"
11
+ "build" : " cd react_ujs && webpack"
9
12
},
10
13
"devDependencies" : {
11
14
"webpack" : " ^2.3.3"
File renamed without changes.
You can’t perform that action at this time.
0 commit comments