-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
38 lines (36 loc) · 1.25 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// define source files and their destinations
// uglify: {
// build: {
// src: ['public/js/*.js', '!public/js/*.min.js'], // source files mask
// dest: 'public/js/', // destination folder
// expand: true, // allow dynamic building
// flatten: true, // remove all unnecessary nesting
// ext: '.min.js' // replace .js to .min.js
// }
// },
cssmin: {
target:{
files: [{
expand: true,
cwd: 'public/css',
src: ['*.css', '!*.min.css'],
dest: 'public/css',
ext: '.min.css'
}]
}
},
watch: {
js: {files: 'js/*.js', tasks: ['uglify']},
}
});
// load plugins
grunt.loadNpmTasks('grunt-contrib-watch');
// grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin')
// register tasks
// grunt.registerTask('default', ['cssmin', 'uglify']);
grunt.registerTask('default', ['cssmin']);
};