-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
68 lines (59 loc) · 1.34 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
'use strict';
module.exports = function (grunt) {
// Load grunt tasks automatically
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
var pck = grunt.file.readJSON('./package.json');
// Define the configuration for all the tasks
grunt.initConfig({
pck: pck,
clean: require('./grunt/clean'),
copy: require('./grunt/copy'),
express: require('./grunt/express'),
watch: require('./grunt/watch'),
open: require('./grunt/open'),
useminPrepare: require('./grunt/useminPrepare'),
usemin: require('./grunt/usemin'),
filerev: require('./grunt/filerev'),
sass: require('./grunt/sass'),
ngAnnotate: require('./grunt/ngAnnotate'),
jshint: require('./grunt/jshint'),
imagemin: require('./grunt/imagemin'),
bump: require('./grunt/bump'),
uglify: require('./grunt/uglify'),
karma: require('./grunt/karma')
});
grunt.registerTask('test', [
'jshint',
'karma'
]);
grunt.registerTask('server', [
'clean:server',
'sass:server',
'express:server',
'open',
'watch'
]);
grunt.registerTask('build', [
'clean:dist',
'sass:dist',
'useminPrepare',
'concat',
'ngAnnotate',
'uglify',
'copy:magma',
'cssmin',
'filerev',
'copy:static',
'imagemin',
'usemin'
]);
grunt.registerTask('dist', [
'test',
'build',
'express:dist'
]);
grunt.registerTask('default', [
'test',
'build'
]);
};