-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
71 lines (63 loc) · 2.03 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
module.exports = function (grunt) {
//Configure main project settings
grunt.initConfig({
sass: {
main: {
options: {
style: 'compressed',
noCache: true
},
files: {
'dist/css/style.min.css': 'src/assets/scss/style.scss'
}
}
},
concat: {
core: {
options: {
sourceMap: true
},
src: [
'src/core/appModule.js',
'src/core/**/*Module.js',
'src/core/**/*Run.js',
'src/core/**/*Config.js',
'src/core/**/*Decorator.js',
'src/core/**/*Factory.js',
'src/core/**/*Service.js',
'src/core/**/*Controller.js',
'src/core/**/*Directive.js',
'src/core/**/*Filter.js',
'src/core/appBootstrap.js'
],
dest: 'dist/js/app/app.js'
},
lib: {
src: [
'node_modules/angular/angular.min.js',
'node_modules/angular-ui-router/release/angular-ui-router.min.js',
'node_modules/ngstorage/ngStorage.js'
],
dest: 'dist/js/app/lib.js'
}
},
watch: {
scss: {
files: 'src/assets/scss/**/*.scss',
tasks: ['sass']
},
core: {
files: ['src/core/**/*.js'],
tasks: ['concat:core']
}
}
});
//Load the plugin
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
//Custom tasks
grunt.registerTask('init', ['sass', 'concat']);
grunt.registerTask('ng', ['concat:lib']);
grunt.registerTask('app', ['concat:core']);
};