]> zoso.dev Git - libnemo.git/commitdiff
fix unpkg build
authorMiro Metsänheimo <miro@metsanheimo.fi>
Mon, 14 Oct 2019 20:20:01 +0000 (23:20 +0300)
committerMiro Metsänheimo <miro@metsanheimo.fi>
Mon, 14 Oct 2019 20:20:01 +0000 (23:20 +0300)
README.md
package.json
webpack.config.js

index 1fb0faf1b14de3a2d90bd6002d33f7b7b36d6900..d62491a13ce7cc2c21244d79b94660a2c8f3b044 100644 (file)
--- 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
+
+```
+<script src="https://unpkg.com/nanocurrency-web@1.0.3" type="text/javascript"></script>
+<scrypt type="text/javascript">
+       NanocurrencyWeb.wallet.generate(...);
+</script>
+```
+
 ---
 
 ## Contributions
index a2dd3c43674508fa03bdee6501b6b9d90c9ce0a5..c534f97187fcbc104b8b4b08875c42ba1bcf5a55 100644 (file)
@@ -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 <miro@metsanheimo.fi>",
        "license": "MIT",
index d8192aeeca081687504ce025b6447407b9f0103d..0a41b3e56939fc659dcc93bd0bc1b911eba85ac8 100644 (file)
@@ -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