-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathGruntfile.js
50 lines (47 loc) · 1.5 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
banner: 'Moip.js',
concat: {
options: {
stripBanners: true,
stripFooters: true,
},
dist: {
src: ['src/creditCard.js', 'src/calculator.js'],
dest: 'build/moip.js'
}
},
jshint : {
all: ['src/**/*.js']
},
uglify: {
options: {
banner: '/*! <%= banner %> - build date: <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'build/moip.js',
dest: 'build/<%= pkg.name %>.min.js'
}
},
qunit: {
options: {
'--web-security': 'no',
coverage: {
src: ['src/**/*.js'],
instrumentedFiles: 'test/instrumented',
htmlReport: 'test/report/coverage',
coberturaReport: 'test/report',
linesThressholdPct: 75
}
},
all: ['test/*.html']
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-qunit-istanbul');
grunt.registerTask('default', ['jshint', 'qunit', 'concat', 'uglify']);
grunt.registerTask('travis', ['qunit']);
};