-
Notifications
You must be signed in to change notification settings - Fork 6
/
Gruntfile.js
57 lines (55 loc) · 1.78 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
module.exports = function(grunt) {
//Project configuration.
grunt.initConfig({
mocha_istanbul: {
src: ["test/www"],
options: {
coverage: true,
root: '.',
reportFormats: ['lcovonly']
}
},
coveralls: {
options: {
force: true
},
main_target: {
src: "coverage/lcov.info"
}
},
uglify: {
options: { sourceMap: true },
dist: {
files: {
'www/js/pacnem.min.js': [
'www/js/pacnem-utils.js',
'www/js/pacnem-api-client.js',
'www/js/pacnem-session.js',
'www/js/pacnem-sponsor-engine.js',
'www/js/pacnem-ui.js',
'www/js/pacnem-controller.js'
],
'www/3rdparty/pacnem-deps.min.js': [
'www/3rdparty/jquery.min.js',
'www/3rdparty/bootstrap-3.3.7/js/bootstrap.min.js',
'www/3rdparty/handlebars.min.js'
]
}
},
deps: {
files: {
'www/js/nem-sdk.min.js': [
'www/js/nem-sdk.js'
]
}
}
}
});
// Load plugins
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-coveralls");
grunt.loadNpmTasks("grunt-mocha-istanbul");
// Tasks to run tests and uglify frontend assets
grunt.registerTask('default', ['uglify:dist', 'uglify:deps', 'mocha_istanbul']);
grunt.registerTask('mocha', 'mocha_istanbul');
};