-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.coffee
105 lines (89 loc) · 2.05 KB
/
config.coffee
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
src = "src"
www = "www"
paths =
www: www
sass:
src: "./#{src}/stylesheets/application.sass"
dest: "./#{www}/stylesheets"
coffee:
src: "./#{src}/javascripts"
dest: "./#{www}/javascripts"
images:
src: "./#{src}/images/**/*"
dest: "./#{www}/images"
multimedia:
src: "./#{src}/multimedia/**/*"
dest: "./#{www}/multimedia"
haml:
src: "./#{src}/haml/**/*.haml"
dest: "./#{www}"
fonts:
src: "./#{src}/fonts/**/*"
dest: "./#{www}/fonts"
hamlc:
src: "./#{src}/javascripts/**/**/**/**/**/*.hamlc"
dest: "./#{www}/javascripts"
pkgName = "demo"
try
pkg = require("/#{process.cwd()}/package.json")
if pkg.name? and pkg.name != ""
pkgName = pkg.name
catch error
console.log "No package.json"
module.exports =
paths: paths
sass:
src: paths.sass.src
dest: paths.sass.dest
options: {}
pathmodify:
name: "#{pkgName}"
dir: "/#{process.cwd()}/src/javascripts/#{pkgName}"
browserify:
dest: paths.coffee.dest
outputName: "application.js"
options:
entries: "#{paths.coffee.src}/application.coffee"
extensions: [".coffee",".css", ".hamlc"]
debug: true
paths: ['./node_modules','./src/javscripts']
images:
src: paths.images.src
dest: paths.images.dest
options: {}
multimedia:
src: paths.multimedia.src
dest: paths.multimedia.dest
options: {}
fonts:
src: paths.fonts.src
dest: paths.fonts.dest
options:
fontAwesome: true
formats: "eot,svg,ttf,woff,woff2"
coffee:
src: paths.coffee.src
dest: paths.coffee.dest
uglify:
options: {}
minifyCss:
options:
compatibility: 'ie8'
haml:
src: paths.haml.src
dest: paths.haml.dest
options: {}
hamlc:
src: paths.hamlc.src
dest: paths.hamlc.dest
outputName: "templates.js"
options:
compile:
includePath: true
pathRelativeTo: "./src/javascripts/#{pkgName}"
browsersync:
options:
open: false
server:
baseDir: [www]
port: 8000