-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
60 lines (50 loc) · 946 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
require "bundler/gem_tasks"
THEMES = %w(
cerulean
cosmo
cyborg
darkly
flatly
journal
litera
lumen
lux
materia
minty
pulse
sandstone
simplex
sketchy
solar
slate
spacelab
superhero
united
yeti
).freeze
source_dir = "bootswatch-src/dist"
namespace :stylesheets do
desc "Cleaning stylesheets directory"
task :clean do
rm_rf "assets/stylesheets/bootswatch"
end
desc "Copy #{source_dir}/themes/"
task :copy do
THEMES.each do |theme|
src_dir = FileList["#{source_dir}/#{theme}/*.scss"]
tgt_dir = "assets/stylesheets/bootswatch/#{theme}/"
mkdir_p tgt_dir
cp_r src_dir, tgt_dir
end
end
desc "Setup stylesheet assets"
task setup: [:clean, :copy]
end
desc "Remove minified file .min"
task :cleanup do
Dir.glob('assets/**/*.min.*').each do |file|
rm file
end
end
desc "Setup or update assets files"
task setup: ["stylesheets:setup"]