-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathGruntfile.js
98 lines (94 loc) · 2.72 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-bower-task');
grunt.renameTask('bower', 'bowerTask');
grunt.loadNpmTasks('grunt-bower');
grunt.renameTask('bower', 'gruntBower');
grunt.loadNpmTasks('grunt-contrib-copy');
// grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
// grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-ngdocs');
grunt.loadNpmTasks('grunt-gh-pages');
// grunt.registerTask('bower', ['bowerTask', 'gruntBower']);
grunt.registerTask('bower', ['bowerTask', 'gruntBower']);
grunt.registerTask('default', ['build']);
grunt.registerTask('build', ['clean', 'bower', 'concat']);
grunt.registerTask('release', ['build','copy:samples', 'ngdocs']);
grunt.registerTask('docs', ['ngdocs']);
// Print a timestamp (useful for when watching)
grunt.registerTask('timestamp', function() {
grunt.log.subhead(Date());
});
// Project configuration.
grunt.initConfig({
dirs: {
dist: 'dist',
src: {
js: ['src/**/couchPotato.js']
}
},
'gh-pages': {
options: {
base: 'dist'
},
src: ['**']
},
pkg: grunt.file.readJSON('package.json'),
banner:
'/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
' * Copyright (c) <%= grunt.template.today(\'yyyy\') %> <%= pkg.author.name %>;\n' +
' * Uses software code originally found at https://github.com/szhanginrhythm/angular-require-lazyload\n' +
' * Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n */\n',
ngdocs: {
options: {
dest: 'dist/docs',
title: 'angular-couch-potato',
startPage: '/guide',
styles: ['docs/css/style.css'],
navTemplate: 'docs/html/nav.html',
html5Mode: false
},
guide: {
src: ['docs/content/guide/**/*.ngdoc'],
title: 'Guide'
},
api: {
src: ['src/**/*.js', 'docs/content/api/**/*.ngdoc'],
title: 'API Reference'
}
},
clean: ['<%= dirs.dist %>/*'],
gruntBower: {
dev: {
dest: '<%= dirs.dist %>/dependencies'
}
},
bowerTask: {
install: {
options: {
copy: false
}
}
},
copy: {
samples: {
expand: true,
cwd: './',
src: 'samples/**/*',
dest: 'dist'
}
},
concat: {
dist: {
options: {
banner: '<%= banner %>',
stripBanners: true
},
src:['<%= dirs.src.js %>'],
dest:'<%= dirs.dist %>/<%= pkg.name %>.js'
}
}
});
};