-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
45 lines (38 loc) · 876 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'rake'
require 'rake/clean'
require 'rake/task'
output = 'public/_site'
deps = 'node_modules'
CLEAN.include(FileList[output, deps])
desc 'run app'
task :run_app do
Rake::Task['build:app'].invoke
Dir.chdir('public') do
system('jekyll serve -w -H 0.0.0.0 --force_polling')
end
end
desc 'prepare app for test'
task :test_app do
Rake::Task['build:app'].invoke
Dir.chdir('public') do
system('jekyll serve --detach')
end
end
namespace :build do
desc 'run install bower'
task :npm_install_bower do
puts 'Installing bower...'
system('npm install bower')
end
desc 'run bower install'
task :bower_install => :npm_install_bower do
puts 'Running bower install...'
system('bower install')
end
desc 'run jekyll build'
task :app => :bower_install do
Dir.chdir('public') do
system('jekyll build')
end
end
end