-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.js
More file actions
75 lines (73 loc) · 2.41 KB
/
Gruntfile.js
File metadata and controls
75 lines (73 loc) · 2.41 KB
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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
css: {
src: ['source/style/*.css'],
dest: 'temp/style/master.css'
},
dist: {
src: ['source/javascript/*.js', 'source/css/*.css'],
dest: 'temp/javascript/master.js',
}
},
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files: {
'public/style/master.min.css': ['temp/style/*.css']
}
}
},
jshint: {
files: ['Gruntfile.js', 'source/javascript/*.js'],
options: {
globals: {
jQuery: true,
console: true,
module: true,
document: true,
"boss": false,
"curly": true,
"eqeqeq": true,
"expr": true,
"immed": true,
"newcap": true,
"noempty": true,
"noarg": true,
"undef": true,
"regexp": true,
"browser": true,
"devel": true,
"node": true
}
}
},
uglify: {
dist: {
src: ['temp/javascript/master.js'],
dest: "public/javascript/master.min.js"
}
},
copy: {
main: {
src: ['source/*.html', 'source/images/*', 'source/plug/*', 'source/style/*.eot', 'source/style/*.svg', 'source/style/*.ttf', 'source/style/*.woff'],
dest: 'public/',
}
},
clean: ["temp", "public/source", "node_modules"]
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-css');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('test', ['uglify']);
grunt.registerTask('cl', ['clean']);
grunt.registerTask('default', ['jshint', 'concat', 'copy', 'cssmin']);
};