-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
99 lines (94 loc) · 2.64 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ['Gruntfile.js', 'js/**/*.js', 'test/**/*.js']
},
uglify: {
build: {
files: {
'dist/app.min.js': ['tmp/annotated.js']
}
}
},
cssmin: {
minify: {
src: ['css/bootstrap-spacelab.css', 'css/styles.css'],
dest: 'dist/app.min.css'
}
},
copy: {
main: {
files: [
// includes files within path and its sub-directories
{expand: true, src: ['partials/**', '*.html', 'images/**', 'favicons/**'], dest: 'dist/'}
]
}
},
watch: {
options: {
livereload: true,
spawn: true
},
all: {
files: ['index.html', 'login.html', 'js/**/*.js','partials/*.html', 'css/*.css']
}
},
ngAnnotate: {
target: {
files: {
'tmp/annotated.js': ['js/**/*.js']
}
}
},
clean: ['dist', 'tmp'],
aerobatic: {
deploy: {
src: ['*.html', 'dist/*.*', 'favicons/*', 'partials/*.html', 'images/*.*', 'bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.min.js'],
},
sim: {
index: 'index.html',
login: 'login.html',
protocol: 'https',
port: 3000
}
},
karma: {
options: {
files: [
'http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js',
'http://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js',
'http://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular-mocks.js',
'test/fixtures.js',
'js/**/*.js',
'test/spec/**/*.js'
],
frameworks: ['jasmine'],
browsers: ['Chrome'],
logLevel: 'INFO',
plugins : [
'karma-jasmine',
'karma-chrome-launcher'
],
reporters: 'dots'
},
unit: {
singleRun: true
}
}
});
grunt.registerTask('sim', ['aerobatic:sim:sync', 'watch']);
grunt.registerTask('deploy', ['build', 'aerobatic:deploy']);
grunt.registerTask('build', ['clean', 'jshint', 'cssmin', 'ngAnnotate', 'uglify', 'copy']);
grunt.registerTask('test', ['karma']);
grunt.loadNpmTasks('grunt-aerobatic');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-ng-annotate');
grunt.loadNpmTasks('grunt-karma');
};