File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
pin_all_from File . expand_path ( "../app/javascript/blacklight" , __dir__ ) , under : "blacklight"
4
+ pin_all_from File . expand_path ( "../app/javascript/controllers" , __dir__ ) , under : "controllers"
Original file line number Diff line number Diff line change @@ -119,3 +119,18 @@ namespace :blacklight do
119
119
end
120
120
end
121
121
end
122
+
123
+ if Rake ::Task . task_defined? ( 'stimulus:manifest:display' )
124
+ Rake ::Task [ 'stimulus:manifest:display' ] . enhance do
125
+ puts Stimulus ::Manifest . generate_from ( Blacklight ::Engine . root . join ( "app/javascript/controllers" ) ) . join ( "\n " ) . gsub ( './blacklight/' , 'blacklight-frontend/app/javascript/controllers/blacklight/' )
126
+ end
127
+ end
128
+
129
+ if Rake ::Task . task_defined? ( 'stimulus:manifest:update' )
130
+ Rake ::Task [ 'stimulus:manifest:update' ] . enhance do
131
+ manifest = Stimulus ::Manifest . generate_from ( Blacklight ::Engine . root . join ( "app/javascript/controllers" ) ) . join ( "\n " ) . gsub ( './blacklight/' , 'blacklight-frontend/app/javascript/controllers/blacklight/' )
132
+ File . open ( Rails . root . join ( "app/javascript/controllers/index.js" ) , "a+" ) do |index |
133
+ index . puts manifest
134
+ end
135
+ end
136
+ end
Original file line number Diff line number Diff line change 30
30
" not IE 11"
31
31
],
32
32
"dependencies" : {
33
+ "@hotwired/stimulus" : " ^3.2.1" ,
33
34
"bootstrap" : " >=4.3.1 <6.0.0"
34
35
}
35
36
}
You can’t perform that action at this time.
0 commit comments