forked from Criptomonedas/rippled
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrunt.js
81 lines (79 loc) · 2.56 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-webpack');
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
concat: {
sjcl: {
src: [
"src/js/sjcl/core/sjcl.js",
"src/js/sjcl/core/aes.js",
"src/js/sjcl/core/bitArray.js",
"src/js/sjcl/core/codecString.js",
"src/js/sjcl/core/codecHex.js",
"src/js/sjcl/core/codecBase64.js",
"src/js/sjcl/core/codecBytes.js",
"src/js/sjcl/core/sha256.js",
"src/js/sjcl/core/sha512.js",
"src/js/sjcl/core/sha1.js",
"src/js/sjcl/core/ccm.js",
// "src/js/sjcl/core/cbc.js",
// "src/js/sjcl/core/ocb2.js",
"src/js/sjcl/core/hmac.js",
"src/js/sjcl/core/pbkdf2.js",
"src/js/sjcl/core/random.js",
"src/js/sjcl/core/convenience.js",
"src/js/sjcl/core/bn.js",
"src/js/sjcl/core/ecc.js",
"src/js/sjcl/core/srp.js",
"src/js/sjcl-custom/sjcl-secp256k1.js",
"src/js/sjcl-custom/sjcl-ripemd160.js",
"src/js/sjcl-custom/sjcl-extramath.js",
"src/js/sjcl-custom/sjcl-validecc.js",
"src/js/sjcl-custom/sjcl-ecdsa-der.js"
],
dest: 'build/sjcl.js'
}
},
webpack: {
lib: {
src: "src/js/index.js",
dest: "build/ripple-<%= pkg.version %>.js",
libary: "ripple", // misspelling fixed in later versions of webpack
library: "ripple"
},
lib_debug: {
src: "src/js/index.js",
dest: "build/ripple-<%= pkg.version %>-debug.js",
libary: "ripple", // misspelling fixed in later versions of webpack
library: "ripple",
debug: true
},
lib_min: {
src: "src/js/index.js",
dest: "build/ripple-<%= pkg.version %>-min.js",
libary: "ripple", // misspelling fixed in later versions of webpack
library: "ripple",
minimize: true
}
},
watch: {
sjcl: {
files: ['<config:concat.sjcl.src>'],
tasks: 'concat:sjcl'
},
lib: {
files: 'src/js/*.js',
tasks: 'webpack'
}
}
});
// Tasks
grunt.registerTask('default', 'concat:sjcl webpack');
};