forked from jmendiara/ng-di
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
88 lines (82 loc) · 2.1 KB
/
grunt.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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! \n* <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* <%= pkg.description %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Adaptation done <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;\n' +
'* All credits must go to the AngularJS team.\n' +
'* Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n */'
},
concat: {
dist: {
src: ['<banner:meta.banner>',
'lib/prefix.tpl',
'<file_strip_banner:lib/<%= pkg.name %>.js>',
'lib/suffix.tpl'],
dest: 'dist/<%= pkg.name %>.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'dist/<%= pkg.name %>.min.js'
}
},
copy: {
dist: {
files: {
'dist/ng-di-mocks.js': 'lib/ng-di-mocks.js'
}
}
},
lint: {
files: ['grunt.js', '<config:concat.dist.dest>']
},
watch: {
files: '<config:lint.files>',
tasks: 'lint test'
},
jshint: {
options: {
curly: false,
eqeqeq: false,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true
},
globals: {
exports: true,
module: false
}
},
uglify: {},
testacularServer: {
unit: {
options: {
keepalive: true
},
configFile: 'test/testacular.conf.js',
autoWatch: true,
runnerPort: 9100
}
},
testacularRun: {
unit: {
runnerPort: 9100
}
}
});
grunt.loadNpmTasks('grunt-testacular');
grunt.loadNpmTasks('grunt-contrib-copy');
// Default task.
grunt.registerTask('default', 'concat lint min copy:dist');
};