-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMockupfile
More file actions
56 lines (39 loc) · 1.4 KB
/
Mockupfile
File metadata and controls
56 lines (39 loc) · 1.4 KB
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
# Configure your mockup here
require 'sass/plugin/rack'
require 'html_mockup/release/processors/sass'
require 'html_mockup/release/processors/requirejs'
require 'html_mockup/release/processors/yuicompressor'
require File.dirname(__FILE__) + "/vendor/rsync_finalizer"
require File.dirname(__FILE__) + "/vendor/rss_generator"
require File.dirname(__FILE__) + "/vendor/sass_inline_data"
Sass::Plugin.options[:style] = :expanded
Sass::Plugin.options[:template_location] = {
"./html/stylesheets" => "./html/stylesheets"
}
# Set as constant here so it can be accessed by release too
::HTML_ROOT = mockup.project.html_path
Sass::Plugin.options[:custom] = {
:root => HTML_ROOT
}
mockup.serve do |s|
s.port = 9000
s.use Sass::Plugin::Rack
end
mockup.release do |r|
r.extract :url_relativize => false
r.cleanup "preparation/"
r.use :sass
# Inject banners
r.inject({ /\/\*\s*\[BANNER\]\s*\*\// => r.banner(:comment => :css)}, :into => %w{**/*.css})
# Compress
r.use :yuicompressor, :skip => [/javascripts\/vendor\/.*\.js\Z/, /_doc\/.*/, /\/\d+\/.*\Z/]
# Generate RSS
r.use RssGenerator
# Cleanup on the build
r.cleanup "**/.DS_Store"
r.cleanup "**/.sass-cache"
r.cleanup "**/stylesheets/src"
r.cleanup "styleguide/"
#r.finalize RsyncFinalizer, :host => "venus.digitpaint.nl", :username => "admin", :remote_path => "vhome/digitpaint.nl/advent2012"
r.finalize :dir
end