forked from crisbeto/angular-svg-round-progressbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
100 lines (95 loc) · 2.57 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
// jshint node:true
module.exports = function(grunt) {
var files = [
'src/shim.js',
'src/module.js',
'src/roundProgressConfig.js',
'src/roundProgressService.js',
'src/roundProgress.js',
];
var banner = [
'/* <%= pkg.name %>@<%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */',
'(function(){',
' "use strict";',
''
].join('\n');
var footer = '\n })();';
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: banner,
footer: footer
},
build: {
src: files,
dest: 'build/roundProgress.min.js'
}
},
concat: {
options: {
separator: '\n',
banner: banner,
footer: footer
},
build: {
src: files,
dest: 'build/roundProgress.js',
}
},
'gh-pages': {
options: {
base: 'build'
},
deploy: {
src: [
'index.html',
'demo.css',
'demo.js',
'roundProgress.js',
'roundProgress.min.js'
]
}
},
jshint: {
options: {
jshintrc: true,
reporter: require('jshint-stylish')
},
src: {
files: {
src: files
}
}
},
watch: {
options: {
debounceDelay: 250,
livereload: true
},
main: {
// not the most efficient but it doesn't require
// modification of the index.html
files: ['src/**/*.js'],
tasks: ['concat:build']
},
html: {
files: ['build/index.html']
}
},
connect: {
server: {
options: {
port: 1337,
livereload: true,
base: 'build',
open: true
}
}
}
});
grunt.registerTask('default', ['concat:build', 'connect', 'watch']);
grunt.registerTask('build', ['jshint:src', 'concat:build', 'uglify:build']);
grunt.registerTask('deploy', ['build', 'gh-pages:deploy']);
};