-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
70 lines (62 loc) · 1.49 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
57
58
59
60
61
62
63
64
65
66
67
68
69
module.exports = (grunt) ->
# Project configuration
grunt.initConfig {
pkg: grunt.file.readJSON('package.json')
concat: {
options: {
separator: ';'
}
basic: {
src: ['src/axes.js', 'src/chart.js', 'src/bar.js', 'src/timeseries.js']
dest: 'build/<%= pkg.name %>.js'
}
extras: {
src: ['vendor/jquery.mousewheel.js', 'vendor/interact-1.2.4.js', 'vendor/moment-2.9.0.js','vendor/lodash-3.5.0.js', 'src/axes.js', 'src/chart.js', 'src/bar.js', 'src/timeseries.js']
dest: 'build/<%= pkg.name %>-deps.js'
}
}
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
}
build: {
files: [
{
src: 'build/<%= pkg.name %>.js'
dest: 'build/<%= pkg.name %>.min.js'
}
{
src: 'build/<%= pkg.name %>-deps.js'
dest: 'build/<%= pkg.name %>-deps.min.js'
}
]
}
}
sass: {
dist: {
options: {
style: 'expanded'
}
files: {
'build/<%= pkg.name %>.css': 'css/<%= pkg.name %>.sass',
}
}
}
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
}
target: {
files: {
'build/<%= pkg.name %>.min.css': 'build/<%= pkg.name %>.css'
}
}
}
}
grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-contrib-sass')
grunt.loadNpmTasks('grunt-contrib-cssmin')
# Default task(s)
grunt.registerTask('default', ['concat', 'sass', 'uglify', 'cssmin'])