forked from hafeez-syed/angular-common
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
77 lines (72 loc) · 2.23 KB
/
Gruntfile.js
File metadata and controls
77 lines (72 loc) · 2.23 KB
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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.initConfig({
concat: {
options: {
separator: "\n\n"
},
javascript: {
src: [
'bower_components/moment/min/moment.min.js',
'bower_components/lodash.min.js',
'bower_components/mediaelement/build/mediaelement-and-player.min.js',
'bower_components/jquery-form/jquery.form.js',
'bower_components/bootstrap/dist/js/bootstrap.min.js',
'bower_components/bootstrap-daterangepicker/daterangepicker.js',
'bower_components/angular/angular.min.js',
'modules/**/*.js',
'!modules/**/*Spec.js'
],
dest: 'build/angular-common.js'
}
},
uglify: {
dist: {
files: {
'build/angular-common.min.js': 'build/angular-common.js'
}
}
},
karma: {
options: {
configFile: 'karma.conf.js'
},
phantom: {
singleRun: true,
browsers: ['PhantomJS']
},
chrome: {
browsers: ['PhantomJS'],
singleRun: false,
autoWatch: true
}
},
'gh-pages': {
options: {
base: './'
},
src: ['index.html', 'README.md', 'build/**', 'modules/**']
},
watch: {
js: {
files: ['modules/**/*.js'],
tasks: ['concat:javascript', 'uglify']
}
}
});
grunt.registerTask('build', [
'concat:javascript',
'uglify'
]);
grunt.registerTask('default', [
'karma:phantom',
'concat:javascript',
'uglify'
]);
grunt.registerTask('test', ['karma:chrome']);
};