forked from densitydesign/sven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
60 lines (56 loc) · 2.38 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
module.exports = function(grunt) {
grunt.initConfig({
less: {
development: {
options: {
compress: false
},
files: {
"./src/build/css/style.css": "src/less/style.less"
}
},
production: {
options: {
compress:true,
cleancss: true
},
files: {
"./src/build/css/style.min.css": "src/less/style.less"
}
}
},
pkg: grunt.file.readJSON('./package.json'),
uglify: {
options: {
banner: '/*\n\n Sven \n ================================\n\n<%= pkg.description %> - Version: <%= pkg.version %> */\n'
},
production: {
files: {
'./src/build/js/sven.min.js': [
// jquery stuffs
'./src/js/libs/jquery.scrolltofixed.min.js',
// angular plugins without CDN
'./src/js/libs/angular-ui-bootstrap-tpls.min.js',
'./src/js/libs/angular-file-upload.min.js',
'./src/js/libs/angular-ui-bootstrap-tpls.min.js',
'./src/js/libs/angular-elastic.js',
'./src/js/libs/angular-svenD3.js',
'./src/js/libs/jquery.toastmessage.js',
'./src/js/services.js',
'./src/js/controllers.js',
'./src/js/filters.js',
'./src/js/directives.js',
'./src/js/app.js'
]
}
}
}
});
console.log("\n * .--.\n / / `\n + | |\n ' \\ \\__,\n * + '--' *\n + /\\\n + .' '. *\n * /======\\ +\n ;:. _ ;\n |:. (_) |\n |:. _ |\n + |:. (_) | *\n ;:. ;\n .' \:. / `.\n / .-'':._.'`-. \\\n |/ /||\\ \\|\n jgs _..--\"\"\"````\"\"\"--.._\n _.-'`` ``'-._\n -' '-\n\n");
console.log(grunt.cli.tasks.join(''));
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-angular-templates');
grunt.registerTask('default', ['less:development','uglify:production']);
grunt.registerTask('production', ['less:production','uglify:production']);
};