-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
93 lines (87 loc) · 2.5 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
module.exports = function(grunt) {
grunt.initConfig({
dirs: {
js: 'public/js',
angular: 'bower_components/angular',
angularResource: 'bower_components/angular-resource',
angularRoute: 'bower_components/angular-route',
jquery: 'bower_components/jquery/dist',
bootstrap: 'bower_components/bootstrap/dist'
},
copy: {
main: {
files: [
{
flatten: true,
src: ['<%= dirs.angular %>/angular.min.js'],
dest: 'public/js/libraries/angular.min.js'
},
{
flatten: true,
src: ['<%= dirs.angularResource %>/angular-resource.min.js'],
dest: 'public/js/libraries/angular-resource.min.js'
},
{
flatten: true,
src: ['<%= dirs.angularRoute %>/angular-route.min.js'],
dest: 'public/js/libraries/angular-route.min.js'
},
{
flatten: true,
src: ['<%= dirs.jquery %>/jquery.min.js'],
dest: 'public/js/libraries/jquery.min.js'
},
{
flatten: true,
src: ['<%= dirs.bootstrap %>/css/bootstrap.min.css'],
dest: 'public/css/bootstrap.min.css'
},
{
flatten: true,
src: ['<%= dirs.bootstrap %>/css/bootstrap-theme.min.css'],
dest: 'public/css/bootstrap-theme.min.css'
},
{
flatten: true,
src: ['<%= dirs.bootstrap %>/js/bootstrap.min.js'],
dest: 'public/js/libraries/bootstrap.min.js'
},
{
expand: true,
flatten: true,
src: ['<%= dirs.bootstrap %>/fonts/*'],
dest: 'public/fonts/'
}
]
}
},
watch: {
all: {
options: {
livereload: true
},
files: [
'public/index.html',
'public/js/app.js',
'public/js/controllers.js',
'public/js/services.js',
'public/js/controllers/*.js',
'public/js/services/*.js',
'public/partials/*.html'
]
}
},
clean: [
'bower_components',
'node_modules',
'public/css/bootstrap.min.css',
'public/css/bootstrap-theme.min.css',
'public/fonts',
'public/js/libraries'
]
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['copy']);
};