-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.coffee
56 lines (51 loc) · 1.25 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# global config:true, file:true, task:true, module: true
path = require 'path'
fs = require 'fs'
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
clean:
before: ['dist']
after: ['temp']
coffee:
build:
files: [
{ src: ['*.coffee'], cwd: 'app', dest: 'temp', ext: '.js', expand: true }
]
concat:
build:
src: [
'wrap/before.js'
'node_modules/tether/tether.min.js'
'temp/*.js'
'wrap/after.js'
]
dest: 'dist/main.js'
uglify:
build:
files:
'dist/main.min.js': 'dist/main.js'
sass:
build:
files:
'dist/main.css': 'app/main.scss'
cssmin:
build:
files:
'dist/main.min.css': 'dist/main.css'
grunt.registerTask 'build', [
'clean:before'
'coffee'
'concat'
'uglify'
'sass'
'cssmin'
'clean:after'
]
grunt.registerTask 'default', ['build']
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-sass'
grunt.loadNpmTasks 'grunt-contrib-cssmin'