-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
103 lines (103 loc) · 2.64 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
module.exports = function(grunt){
jsFiles = [
'public/libs/underscore/underscore.js',
'public/libs/jquery/dist/jquery.js',
'public/libs/jquery-ui/jquery-ui.js',
'public/libs/jquery-ui/ui/core.js',
'public/libs/jquery-ui/ui/widget.js',
'public/libs/angular/angular.js',
'public/libs/angular-animate/angular-animate.js',
'public/libs/angular-sanitize/angular-sanitize.js',
'public/libs/angular-bootstrap/ui-bootstrap-tpls.js',
'public/libs/angular-ui-router/release/angular-ui-router.js',
'public/libs/restangular/dist/restangular.js',
'public/libs/moment/moment.js',
'public/js/modules/nmt-App.js',
'public/js/modules/nmt-AppConfig.js',
'public/js/modules/nmt-Routing.js',
'public/js/controllers/mainController.js',
'public/js/controllers/devController.js',
'public/js/controllers/searchController.js',
'public/js/services/**/*.js',
'public/js/filters/**/*.js',
'public/js/directives/**/*.js'
],
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
noCache: true,
loadPath: [
'public/libs/bootstrap-sass-official/assets/stylesheets/',
'public/libs/bootstrap-sass-official/assets/stylesheets/bootstrap/',
'public/libs/font-awesome/scss',
'public/libs/bootswatch-scss/cyborg/'
],
style: 'compressed'
},
files: {
'public/builds/style.css': 'public/style/sass/style.scss'
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'builds/script.js',
dest: 'builds/script.min.js'
}
},
watch: {
css: {
files: '**/*.scss',
tasks: ['sass']
}
},
concat: {
options: {
separator: ';',
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
dist: {
src: jsFiles,
dest: 'public/builds/script.js'
}
},
jshint: {
all: ['public/js/**/*.js']
},
notify_hooks: {
options: {
enabled: true,
max_jshint_notifications: 5
}
},
copy: {
fonts: {
expand: true,
flatten: true,
filter: 'isFile',
src: ['public/libs/font-awesome/fonts/**'],
dest: 'public/fonts'
}
},
notify: {
complete: {
options: {
message: 'Grunt Completed!'
}
},
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-notify');
grunt.registerTask('default',['jshint', 'sass', 'concat', 'copy', 'notify:complete']);
}