This repository has been archived by the owner on Sep 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
48 lines (46 loc) · 1.73 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
mergeJs: {
src: ['bower_components/milagro-crypto/js/DBIG.js','bower_components/milagro-crypto/js/BIG.js', 'bower_components/milagro-crypto/js/FP.js', 'bower_components/milagro-crypto/js/ROM.js', 'bower_components/milagro-crypto/js/HASH.js', 'bower_components/milagro-crypto/js/RAND.js', 'bower_components/milagro-crypto/js/AES.js', 'bower_components/milagro-crypto/js/GPM.js', 'bower_components/milagro-crypto/js/ECP.js', 'bower_components/milagro-crypto/js/FP2.js', 'bower_components/milagro-crypto/js/ECP2.js', 'bower_components/milagro-crypto/js/FP4.js', 'bower_components/milagro-crypto/js/FP12.js', 'bower_components/milagro-crypto/js/PAIR.js', 'bower_components/milagro-crypto/js/MPIN.js', 'bower_components/milagro-crypto/js/MPINAuth.js', 'lib/mpin.js'],
dest: './dist/mpinjs.js'
}
},
bgShell: {
createDir: {
cmd: "mkdir -p ./dist",
options: {
stdout: true
}
},
test: {
cmd: 'mocha',
options: {
stdout: true
}
},
testCoverage: {
cmd: 'mocha test --require blanket --reporter html-cov > test/coverage.html',
options: {
stdout: true
}
},
bowerInstall: {
cmd: 'bower install --allow-root',
options: {
stdout: true
}
}
}
});
grunt.loadNpmTasks('grunt-bg-shell');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('build', ['bgShell:createDir', 'bgShell:bowerInstall', 'concat']);
grunt.registerTask('chk', ['bgShell:createDir', 'bgShell:bowerInstall', 'concat']);
grunt.registerTask('test', ['bgShell:test']);
grunt.registerTask('testCover', ['bgShell:testCoverage']);
};