forked from StephanHoyer/ng-translate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
75 lines (70 loc) · 1.83 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
/*
* gruntacular
* https://github.com/OpenWebStack/gruntacular
*
* Copyright (c) 2013 Dave Geddes
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-release');
grunt.loadNpmTasks('gruntacular');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
options: {
configFile: 'testacular.conf.js',
browsers: ['Chrome'],
singleRun: true
},
dev: {
reporters: 'dots'
},
testacular : {
options: {
configFile: 'testacular.conf.js',
runnerPort: 9999,
browsers: ['Chrome']
},
travis: {
browsers: ['Firefox'],
singleRun: true
},
single: {
browsers: ['Chrome'],
singleRun: true
},
dev: {
reporters: 'dots'
}
},
meta: {
banner: '/**\n' + ' * <%= pkg.description %>\n' +
' * @version v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
' * @author <%= pkg.author.name %>\n' +
' * @link <%= pkg.homepage %>\n' +
' * @license MIT License, http://www.opensource.org/licenses/MIT\n' + ' */\n\n'
},
builddir: 'build',
concat: {
options: {
banner: '<%= meta.banner %>'
},
build: {
src: ['translate.js'],
dest: '<%= builddir %>/<%= pkg.name %>.js'
}
},
uglify: {
build: {
src: ['<%= builddir %>/<%= pkg.name %>.js'],
dest: '<%= builddir %>/<%= pkg.name %>.min.js'
}
}
});
grunt.registerTask('build', ['concat', 'uglify']);
grunt.registerTask('travis', ['testacular:travis', 'build']);
grunt.registerTask('test', ['testacular:single']);
grunt.registerTask('default', ['test', 'build']);
};