-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
44 lines (40 loc) · 1.11 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
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
// Task configuration.
uglify: {
options: {
mangle: true
},
dist: {
files: {
'static/js/myblog_front.min.js': ['static/js/article.js','static/js/markdown.js'],
'static/js/myblog_backend.min.js': ['static/admin/js/**/*.js','!static/admin/js/**/logincontrol.js']
}
}
},
cssmin: {
target: {
files: {
'static/css/myblog_backend.min.css':['static/admin/css/*.css', '!static/admin/css/form.css'],
'static/css/main.min.css':['static/css/main.css']
}
}
},
watch: {
scripts: {
files:['static/**/*.js'],
tasks:['uglify']
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task.
grunt.registerTask('default', ['cssmin', 'uglify', 'watch']);
};