-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.coffee
42 lines (36 loc) · 1.34 KB
/
Gruntfile.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
module.exports = (grunt) ->
config =
append: if grunt.option "append" then grunt.option "append" else ""
uglify:
build:
files:
"tmp/build.js" : [
"apps/default/assets/js/deps/jquery.pjax.js",
"apps/*/assets/js/*.js"
]
nodeflakes:
files:
"public/assets/js/nodeflakes<%= append %>.min.js" : ["public/nodeflakes-client/js/*.js"]
concat:
options:
separator: ";\n"
build:
src: [
"apps/default/assets/js/deps/jquery.min.js",
"tmp/build.js"
]
dest: "public/assets/js/main<%= append %>.min.js"
sass:
options:
style: "compressed"
sourcemap: "none"
build:
files:
"public/assets/css/style<%= append %>.min.css" : "sass/style.scss"
grunt.initConfig config
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-concat"
grunt.loadNpmTasks "grunt-contrib-sass"
grunt.registerTask "clean", ->
grunt.file.delete "tmp/build.js", {force:true}
grunt.registerTask "default", ["uglify", "concat", "clean", "sass"]