From 44d88fcfb3670200c8d2e864f931b53b707a7f54 Mon Sep 17 00:00:00 2001 From: junderw Date: Sat, 29 Dec 2018 11:10:25 +0900 Subject: [PATCH] Clean up scripts and add postinstall for installing via git --- package.json | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index ceb96de..0a09c44 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "4.0.2", "description": "Client-side Bitcoin JavaScript library", "main": "./dist/src/index.js", + "types": "./dist/src/index.d.ts", "engines": { "node": ">=8.0.0" }, @@ -14,14 +15,21 @@ "bitcoinjs" ], "scripts": { - "coverage-report": "nyc report --reporter=lcov", - "coverage-html": "nyc report --reporter=html", - "coverage": "nyc --check-coverage --branches 90 --functions 90 --lines 90 mocha", - "integration": "npm run build && mocha --timeout 50000 test/integration/", - "standard": "standard", - "test": "npm run build && npm run standard && npm run coverage", - "unit": "npm run build && mocha", - "build": "tsc -d -p tsconfig.json" + "build": "tsc -d -p ./tsconfig.json", + "coverage-report": "npm run build && npm run nobuild:coverage-report", + "coverage-html": "npm run build && npm run nobuild:coverage-html", + "coverage": "npm run build && npm run nobuild:coverage", + "integration": "npm run build && npm run nobuild:integration", + "nobuild:coverage-report": "nyc report --reporter=lcov", + "nobuild:coverage-html": "nyc report --reporter=html", + "nobuild:coverage": "nyc --check-coverage --branches 90 --functions 90 --lines 90 mocha", + "nobuild:integration": "mocha --timeout 50000 test/integration/", + "nobuild:standard": "standard", + "nobuild:unit": "mocha", + "prepare": "npm run build", + "standard": "npm run build && npm run nobuild:standard", + "test": "npm run build && npm run nobuild:standard && npm run nobuild:coverage", + "unit": "npm run build && npm run nobuild:unit" }, "repository": { "type": "git", @@ -31,6 +39,7 @@ "dist/src" ], "dependencies": { + "@types/node": "^10.12.18", "bech32": "^1.1.2", "bip32": "^1.0.0", "bip66": "^1.1.0", @@ -44,11 +53,11 @@ "safe-buffer": "^5.1.1", "tiny-secp256k1": "^1.0.0", "typeforce": "^1.11.3", + "typescript": "^3.2.2", "varuint-bitcoin": "^1.0.4", "wif": "^2.0.1" }, "devDependencies": { - "@types/node": "^10.12.18", "bip39": "^2.3.0", "bip65": "^1.0.1", "bip68": "^1.0.3", @@ -60,8 +69,7 @@ "mocha": "^5.2.0", "nyc": "^11.8.0", "proxyquire": "^2.0.1", - "standard": "^11.0.1", - "typescript": "^3.2.2" + "standard": "^11.0.1" }, "license": "MIT" }