Browse Source

npm bump

master
peter 2 years ago
parent
commit
181156f3be
5 changed files with 4038 additions and 139 deletions
  1. 1
    0
      .gitignore
  2. 0
    0
      hdkey.ts
  3. 4011
    132
      package-lock.json
  4. 12
    7
      package.json
  5. 14
    0
      webpack.prod.js

+ 1
- 0
.gitignore View File

@@ -1,3 +1,4 @@
1 1
 node_modules
2 2
 *.d.ts
3 3
 *.js
4
+!webpack.prod.js

index.ts → hdkey.ts View File


+ 4011
- 132
package-lock.json
File diff suppressed because it is too large
View File


+ 12
- 7
package.json View File

@@ -2,11 +2,12 @@
2 2
   "name": "btc-hdkey",
3 3
   "version": "0.0.8",
4 4
   "description": "Hierarchical Deterministic Wallet support for BTC",
5
-  "main": "index.js",
6
-  "types": "index.d.ts",
5
+  "main": "hdkey.min.js",
6
+  "types": "hdkey.d.ts",
7 7
   "scripts": {
8
-    "build": "tsc",
9
-    "test": "echo \"Error: no test specified\" && exit 1"
8
+    "build": "tsc; npm run webpack;",
9
+    "test": "echo \"Error: no test specified\" && exit 1",
10
+    "webpack": "webpack --config webpack.prod.js"
10 11
   },
11 12
   "repository": {
12 13
     "type": "git",
@@ -20,13 +21,17 @@
20 21
   "author": "frontblock",
21 22
   "license": "ISC",
22 23
   "devDependencies": {
23
-    "typescript": "^3.5.3"
24
+    "typescript": "^3.5.3",
25
+    "webpack": "^4.39.2",
26
+    "webpack-cli": "^3.3.6"
24 27
   },
25 28
   "files": [
26
-    "index.js",
27
-    "index.d.ts"
29
+    "hdkey.js",
30
+    "hdkey.min.js",
31
+    "hdkey.d.ts"
28 32
   ],
29 33
   "dependencies": {
34
+    "bip39": "^3.0.2",
30 35
     "bitcoinjs-lib": "^5.1.3",
31 36
     "bsert": "0.0.10",
32 37
     "hdkey": "^1.1.1"

+ 14
- 0
webpack.prod.js View File

@@ -0,0 +1,14 @@
1
+const TerserPlugin = require('terser-webpack-plugin');
2
+
3
+const path = require('path');
4
+
5
+  
6
+module.exports = {
7
+    mode: 'production',
8
+    entry: path.resolve(__dirname, 'hdkey.js'),
9
+    output: {
10
+        path: path.resolve(__dirname, '.'),
11
+        filename: 'hdkey.min.js',
12
+    },
13
+
14
+  }

Loading…
Cancel
Save