forked from cgross/angular-busy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
executable file
·86 lines (81 loc) · 1.9 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
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
connect: {
main: {
options: {
port: 9001
}
}
},
watch: {
main: {
options: {
livereload: true,
livereloadOnError: false,
spawn: false
},
files: ['angular-busy.html','angular-busy.js','angular-busy.css','dist/**/*','demo/**/*'],
tasks: ['jshint','build']
}
},
jshint: {
main: {
options: {
jshintrc: '.jshintrc'
},
src: 'angular-busy.js'
}
},
jasmine: {
unit: {
src: ['./bower_components/jquery/dist/jquery.js','./bower_components/angular/angular.js','./bower_components/angular-animate/angular-animate.js','./bower_components/angular-mocks/angular-mocks.js','./dist/angular-busy.js','./demo/demo.js'],
options: {
specs: 'test/*.js'
}
}
},
ngtemplates: {
main: {
options: {
module:'cgBusy',
base:''
},
src:'angular-busy.html',
dest: 'temp/templates.js'
}
},
concat: {
main: {
src: ['angular-busy.js', 'temp/templates.js'],
dest: 'dist/angular-busy.js'
}
},
copy: {
main: {
files: [
{src:'angular-busy.css',dest:'dist/'},
{src:'index.js',dest:'dist/'}
]
}
},
uglify: {
main: {
files: [
{src:'dist/angular-busy.js',dest:'dist/angular-busy.min.js'}
]
}
},
cssmin: {
main: {
files: {
'dist/angular-busy.min.css': 'dist/angular-busy.css'
}
}
}
});
grunt.registerTask('serve', ['jshint','connect', 'watch']);
grunt.registerTask('build',['ngtemplates','concat','uglify','copy','cssmin']);
grunt.registerTask('test',['build','jasmine']);
};