/
config.rb
59 lines (42 loc) · 1.66 KB
/
config.rb
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
require 'bootstrap-sass'
require 'font-awesome-sass'
require 'compass/import-once/activate'
# make @import "yadda"; also find yadda.css
class CSSImporter < Sass::Importers::Filesystem
def extensions
super.merge('css' => :scss)
end
end
# configuration is in package.json
require 'json'
config = JSON.parse(File.read('./package.json'))['config']
# source dir
sass_dir = config["styleRoot"]
# output dir
build_dir = (environment == :production) ? config["destRoot"] : config["devRoot"]
# import dirs
add_import_path "styles"
add_import_path "bower_components"
add_import_path CSSImporter.new("node_modules")
# Set this to the root of your project when deployed:
http_path = "/"
http_stylesheets_dir = "css"
http_fonts_dir = "fonts"
http_javascripts_dir = "js"
http_images_dir = "img"
css_dir = build_dir + "/css"
fonts_dir = build_dir + "/fonts"
javascripts_dir = build_dir + "/js"
images_dir = build_dir + "/img"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
output_style = (environment == :production) ? :compressed : :expanded
# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = false
# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = (environment == :development)
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass