forked from mz121star/NJBlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
77 lines (73 loc) · 2.89 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
71
72
73
74
75
76
77
module.exports = function(grunt) {
// 配置
grunt.initConfig({
pkg : grunt.file.readJSON('package.json'),
requirejs: {
compile: {
options: {
baseUrl: "public/js",
paths: {
jquery: '../lib/jquery/jquery-1.8.2.min',
bootstrap: '../lib/bootstrap/js/bootstrap',
underscore: '../lib/underscore/underscore',
angular: '../lib/angular/angular',
angularResource: '../lib/angular/angular-resource',
text: '../lib/require/text',
i18n:'../lib/require/i18n',
modernizr:'../lib/modernizr',
html5shiv:'../lib/html5shiv',
mcore:'../lib/mcore.min',
fullscreen:'../lib/fullscreen',
mcustomscrollbar:'../lib/jquery.mCustomScrollbar.concat.min',
detectbrowser:'../lib/detectbrowser'
//res:'../resources/nls/res'
},
shim: {
'angular' : {'exports' : 'angular'},
'angular-resource' : {deps:['angular']},
'bootstrap': {deps:['jquery']},
'mcustomscrollbar':{deps:['jquery']},
'underscore': {exports: '_'},
'detectbrowser':{deps:['modernizr']}
/*,
'res':{exports:'res'}*/
},
optimize:"none",
name: "main",
out: "public/js/main-built.js"
//out: "../public/js/main-built.js"
}
}
},
cssmin: {
compress: {
options: {
banner: '/* NJBLog minified css file */'
},
files: {
'dest/njblog.css': ['public/css/base', 'public/themes/glowsimple/default.css']
}
}
},
concat : {
domop : {
src: 'public/js/*.js',
dest: 'dest/njblog.js'
}
},
uglify : {
options : {
banner : '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build : {
src : 'dest/njblog.js',
dest : 'dest/njblog.min.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ['requirejs','cssmin','concat', 'uglify']);
};