This repository was archived by the owner on Sep 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrakefile
55 lines (46 loc) · 1.42 KB
/
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
46
47
48
49
50
51
52
53
54
55
require 'rake/minify'
load 'jzvideo-secrets.rb' if FileTest.exists?('jzvideo-secrets.rb')
Rake::Minify.new(:js) do
dir("public/javascripts") do # we specify only the source directory
group("public/javascripts/all.js") do # the output file name is full path
add("jquery.min.js", :minify => false)
add("underscore-min.js", :minify => false)
add("bootstrap.min.js", :minify => false)
add("app.js")
end
end
end
task :sass do
system "sass -t compressed --update public/stylesheets/style.scss"
end
task :css => [:sass] do
Rake::Minify.new(:css) do
dir("public/stylesheets") do # we specify only the source directory
group("public/stylesheets/all.css") do # the output file name is full path
add("bootstrap.min.css", :minify => false)
add("font-awesome.css", :minify => false)
add("style.css", :minify => false)
end
end
end
end
task :run => [:set_development_environment] do
sh "play dependencies --%prod --sync"
sh "play run"
end
task :test => [:set_development_environment] do
sh "play dependencies --%test --sync"
sh "play test"
end
task :import_test => [:set_test_environment_local] do
sh "play test"
end
task :import_prod => [:set_prod_environment_local] do
sh "play test"
end
task :deploy_test => [:set_test_environment_heroku] do
sh "git push heroku master"
end
task :deploy_prod => [:set_prod_environment_heroku] do
sh "git push heroku-prod master"
end