From 354ca4e7b53b51bc62d2be73676b40b3a6454e2a Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 27 May 2022 23:24:04 +1000 Subject: [PATCH 1/4] Delete build folder before building --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ed95b1b485..1dde7fe622 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ ], "scripts": { "prepare": "husky install", - "build": "run-s build:**", + "build": "rimraf ./build; run-s build:**", "build:main": "tsc -p tsconfig.json", "build:dev": "tsc -p tsconfig.dev.json", "build:esm": "tsc --module es2015 --target es2015 --outDir build/esm", From 5baf42c76e6079bc0dddb064cfbda0c4ca69af9b Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 27 May 2022 23:25:50 +1000 Subject: [PATCH 2/4] Remove `build:dev` This is a type check, already done with `test:tsc` --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 1dde7fe622..53b591011d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "prepare": "husky install", "build": "rimraf ./build; run-s build:**", "build:main": "tsc -p tsconfig.json", - "build:dev": "tsc -p tsconfig.dev.json", "build:esm": "tsc --module es2015 --target es2015 --outDir build/esm", "build:umd": "webpack --config webpack.config.js", "build:umd:min": "webpack --config webpack.config.min.js", From 7b54dd1b59e73f138e5199bf70f87257cd6edfd8 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 27 May 2022 23:26:58 +1000 Subject: [PATCH 3/4] Run build in parallel They use to have intra-dependencies but not the case anymore. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 53b591011d..61487d21eb 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ ], "scripts": { "prepare": "husky install", - "build": "rimraf ./build; run-s build:**", + "build": "rimraf ./build; run-p build:**", "build:main": "tsc -p tsconfig.json", "build:esm": "tsc --module es2015 --target es2015 --outDir build/esm", "build:umd": "webpack --config webpack.config.js", From ec10dcd0adf72a9630615ac81d9173c51284bdbf Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 27 May 2022 23:38:12 +1000 Subject: [PATCH 4/4] Add `prepublish` script --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 61487d21eb..3110b00844 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "doc:html": "typedoc", "doc:cname": "echo 'js-waku.wakuconnect.dev' > build/docs/CNAME", "doc:examples": "mkdir -p build/docs/examples", + "prepublish": "npm run build", "deploy": "node ci/deploy.js", "reset-hard": "git clean -dfx && git reset --hard && npm i && npm run build && for d in examples/*/; do (cd $d; npm i); done" },