Set up webpack library backed by zcash-client-backend-wasm

This commit is contained in:
Jack Grigg 2019-06-11 00:15:22 +01:00
parent f53de917c5
commit 110a611ffe
No known key found for this signature in database
GPG Key ID: 9E8255172BBF9898
4 changed files with 3560 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,5 +10,11 @@
"zcash"
],
"author": "Jack Grigg <jack@z.cash>",
"license": "MIT"
"license": "MIT",
"devDependencies": {
"webpack": "4.33.0"
},
"dependencies": {
"zcash-client-backend-wasm": "file:../zcash-client-backend-wasm/pkg"
}
}

View File

@ -0,0 +1,5 @@
import * as wasm from 'zcash-client-backend-wasm'
export function greet () {
wasm.greet()
}

View File

@ -0,0 +1,10 @@
var path = require('path')
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'zcash-client-sdk.js',
library: 'zcashClientSdk'
}
}