forked from ognus/wallet-address-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
56 lines (54 loc) · 1.64 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-mocha');
grunt.initConfig({
browserify: {
dist: {
files: {
'dist/address-validator.min.js': [
'node_modules/jssha/src/sha256.js',
'src/base58.js',
'src/crypto_utils.js',
'src/currencies.js',
'src/wallet_address_validator.js'
]
}
}
},
uglify: {
dist: {
files: {
'dist/wallet-address-validator.min.js': [
'node_modules/jssha/src/sha256.js',
'src/base58.js',
'src/crypto_utils.js',
'src/currencies.js',
'src/wallet_address_validator.js'
]
}
}
},
// running tests in node
simplemocha: {
options: {
timeout: 3000,
ignoreLeaks: false,
ui: 'bdd',
reporter: 'spec'
},
all: { src: ['test/**/*.js'] }
},
// running tests in browser
mocha: {
all: {
src: ['test/runner.html'],
},
options: {
run: true
}
}
});
grunt.registerTask('default', ['simplemocha', 'uglify', 'mocha']);
};