-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
25 lines (21 loc) · 920 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
require 'bundler/gem_tasks'
namespace :vital do
desc 'Build stylesheets and prepare for a release'
task :build do
puts '-----> Preparing assets for release'
release_dir = "dist"
[
"rm -rf #{release_dir}",
"mkdir -p #{release_dir}/{css,scss}",
"cp {CHANGELOG,LICENSE,README}.md #{release_dir}/",
"cp -R sass #{release_dir}/",
"rm -f #{release_dir}/{,**/}.DS_Store"
].each { |cmd| sh cmd }
sh "bundle exec sass -r vital -C #{release_dir}/sass/vital.css.sass #{release_dir}/css/vital.css"
sh "bundle exec sass -r vital -C -t compressed #{release_dir}/sass/vital.css.sass #{release_dir}/css/vital.min.css"
sh "sass-convert -R -F sass -T scss -C #{release_dir}/sass #{release_dir}/scss"
require_relative 'lib/vital/version'
puts '-----> Compressing'
sh "tar cvzfs vital-v#{Vital::VERSION}.tar.gz '/dist/vital-v#{Vital::VERSION}/' dist/"
end
end