-
Notifications
You must be signed in to change notification settings - Fork 101
/
Gruntfile.js
69 lines (69 loc) · 1.67 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
makeDemos: {
demos: {
options: {
mainTemplate: 'index.ejs',
out: 'demos'
}
},
gh_pages: {
options: {
mainTemplate: 'index.ghpages.ejs',
out: './'
}
}
},
uglify: {
src: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %>*/\n\n'
},
files: {
'dist/angular-fusioncharts.min.js': ['src/angular-fusioncharts.js']
}
}
},
copy: {
core: {
files: [
{
src: 'dist/angular-fusioncharts.min.js',
dest: 'demos/js/angular-fusioncharts.min.js'
},
{
src: 'src/angular-fusioncharts.js',
dest: 'dist/angular-fusioncharts.js'
}
]
}
},
watch: {
options: {
livereload: true
},
taskName: {
files: ['src/*.js', 'example/*.*'],
tasks: ['default']
}
},
connect: {
server: {
options: {
port: 8080,
base: './',
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadTasks('./grunt-tasks');
grunt.loadNpmTasks('grunt-contrib-watch');
//grunt.registerTask('default', ['makeDemos:demos', 'uglify', 'copy']); // For gh-pages branch only
grunt.registerTask('default', ['uglify', 'copy']); // For other branches
grunt.registerTask('watch-server', ['connect', 'watch']);
};