forked from erost/ng-videosharing-embed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
53 lines (46 loc) · 1.47 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
var karma = require('karma');
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
datetime: Date.now(),
concat: {
'myproject': {
src: [ 'src/angular-embedplayer.js',
'src/filters/whitelist.js',
'src/filters/videosettings.js',
'src/directives/embedvideo.js'],
dest: 'temp/ng-videosharing-embed.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= pkg.description %> - ' +
'built <%= grunt.template.today("yyyy-mm-dd") %> - License <%= pkg.license %> (http://www.opensource.org/licenses/<%= pkg.license %>) */\n',
mangle: {toplevel: true},
squeeze: {dead_code: false},
codegen: {quote_keys: true}
},
'myproject': {
src: 'temp/ng-videosharing-embed.js',
dest: 'build/ng-videosharing-embed.min.js'
}
},
karma: {
unit: {
configFile: 'config/karma.conf.js'
},
unitc9: {
configFile: 'config/karma.conf.c9.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-karma');
// Default task.
grunt.registerTask('default', ['concat:myproject', 'uglify:myproject']);
grunt.registerTask('test', ['karma:unit']);
grunt.registerTask('test-c9', ['karma:unitc9']);
};