From a0a8e578d92c7c7e3b6c6b3da5e63347e8a6fab8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Miro=20Mets=C3=A4nheimo?= Date: Mon, 14 Oct 2019 23:20:01 +0300 Subject: [PATCH] fix unpkg build --- README.md | 12 ++++++++++++ package.json | 2 +- webpack.config.js | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1fb0faf..d62491a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ The toolkit supports creating and importing wallets and signing blocks on-device ## Usage +### From NPM + ``` npm install nanocurrency-web ``` @@ -162,6 +164,16 @@ const converted = converter.convert('1', 'NANO', 'RAW') // Convert 1 RAW to Nano const converted = converter.convert('1000000000000000000000000000000', 'RAW', 'NANO') ``` + +### In web + +``` + + + NanocurrencyWeb.wallet.generate(...); + +``` + --- ## Contributions diff --git a/package.json b/package.json index a2dd3c4..c534f97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nanocurrency-web", - "version": "1.0.2", + "version": "1.0.3", "description": "Toolset for Nano cryptocurrency client side offline integrations", "author": "Miro Metsänheimo ", "license": "MIT", diff --git a/webpack.config.js b/webpack.config.js index d8192ae..0a41b3e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,6 +18,7 @@ module.exports = { output: { filename: 'index.min.js', path: path.resolve(__dirname, 'dist'), - libraryTarget: 'commonjs2', + libraryTarget: 'var', + library: 'NanocurrencyWeb', }, } \ No newline at end of file -- 2.34.1