Skip to content

Commit 7d07144

Browse files
committed
Provide rake tasks to build the js dist packs
#343 (comment)
1 parent a0d59a6 commit 7d07144

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Rakefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,29 @@ require 'rake/testtask'
3232
# end
3333
#
3434
# task default: :test
35+
36+
task :webpack => 'webpack:build'
37+
38+
namespace :webpack do
39+
task :build => ['build:development', 'build:production']
40+
41+
namespace :build do
42+
task :development => 'yarn:install' do
43+
sh "cd builder && bin/webpack"
44+
end
45+
task :production => 'yarn:install' do
46+
sh "cd builder && rake webpacker:compile"
47+
end
48+
end
49+
50+
task :watch => 'yarn:install' do
51+
sh "cd builder && bin/webpack --watch"
52+
end
53+
54+
namespace :yarn do
55+
task :install do
56+
sh "yarn install && cd builder && yarn install"
57+
end
58+
end
59+
end
60+

0 commit comments

Comments
 (0)