-
Notifications
You must be signed in to change notification settings - Fork 5
/
Gruntfile.js
111 lines (99 loc) · 2.95 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
104
105
106
107
108
109
110
111
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
client: {
src: [
"client/keys/dashboardConfigure.js",
"client/app/app.js",
"client/app/auth/auth.controller.js",
"client/app/auth/oauth.controller.js",
"client/app/dashboard/dashboard.controller.js",
"client/app/dashboard/setup.controller.js",
"client/app/forum/allThreads.controller.js",
"client/app/forum/thread.controller.js",
"client/app/profile/profile.controller.js",
"client/app/profile/editProfile.controller.js",
"client/app/navbar/navbar.controller.js",
"client/app/route-config.js",
"client/app/services/forum.service.js",
"client/app/services/user.service.js",
"client/app/services/keenio.service.js"
],
dest: 'client/dist/client.js'
},
dependencies: {
src: [
"client/lib/jquery/dist/jquery.min.js",
"client/lib/angular/angular.min.js",
"client/lib/angular-ui-router/release/angular-ui-router.min.js",
"client/lib/angular-jwt/dist/angular-jwt.min.js",
"client/lib/keen-js/dist/keen.min.js",
"client/lib/jquery-knob/dist/jquery.knob.min.js",
"client/lib/Materialize/dist/js/materialize.min.js",
"client/lib/angular-materialize/src/angular-materialize.js",
"client/lib/moment/min/moment.min.js",
"client/lib/ng-file-upload/ng-file-upload-shim.min.js",
"client/lib/ng-file-upload/ng-file-upload.min.js"
],
dest: 'client/dist/dependencies.min.js'
}
},
uglify: {
client: {
src: [
'client/dist/client.js'
],
dest: 'client/dist/client.min.js'
}
},
sass: {
dist: {
files: {
'client/styles/styles.css' : 'client/sass/styles.scss'
}
}
},
watch: {
css: {
files: 'client/**/*.scss',
tasks: ['sass']
}
},
shell: {
seed: {
options: {
stdout: true,
stderr: true
},
command: 'node server/db/seed.js'
}
},
nodemon: {
dev: {
script: 'server/server.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-nodemon');
////////////////////////////////////////////////////
// Main grunt tasks
////////////////////////////////////////////////////
grunt.registerTask('build', [
'concat',
'uglify',
'sass'
]);
grunt.registerTask('default', [
'build',
'nodemon'
]);
};