forked from webuildsg/webuild
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
70 lines (66 loc) · 1.5 KB
/
Gruntfile.js
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
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: [
'public/css/style.css',
'public/js/script.js'
],
csslint: {
options: {
csslintrc: '.csslintrc'
},
strict: {
options: {
import: 2
},
src: ['public/css/style.css']
}
},
jshint: {
all: {
options: {
jshintrc: '.jshintrc'
},
src: [
'Gruntfile.js',
'public/js/main.js',
'events/*.js',
'repos/*.js'
]
}
},
sass: {
dist: {
options: {
style: 'compressed'
},
files: {
'public/css/style.css': 'public/css/style.sass'
}
}
},
uglify: {
production: {
options: {
mangle: false,
compress: true,
beautify: false
},
files: {
'public/js/script.js': [
'public/js/vendor/moment/min/moment.min.js',
'public/js/main.js'
]
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('travis', ['clean', 'sass', 'uglify', 'jshint', 'csslint']);
grunt.registerTask('default', ['clean', 'sass', 'uglify', 'jshint', 'csslint']);
};