From 3aed340cb294403bf7fde27175dd36b21f8efbc7 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Mon, 30 Jan 2023 20:30:31 +1100 Subject: [PATCH] chore: only build what is necessary to test Script to build enough to run tests locally and in CI (skip bundling). --- .github/workflows/ci.yml | 8 ++++---- package.json | 1 + packages/interfaces/package.json | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2ef53c76a..f914d5d303 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: with: node-version: ${{ env.NODE_JS }} - uses: bahmutov/npm-install@v1 - - run: npm run build + - run: npm run build:esm - run: npm run test:browser node: @@ -76,7 +76,7 @@ jobs: with: node-version: ${{ env.NODE_JS }} - uses: bahmutov/npm-install@v1 - - run: npm run build + - run: npm run build:esm - run: npm run test:node env: DEBUG: "" @@ -130,7 +130,7 @@ jobs: node-version: ${{ env.NODE_JS }} - uses: bahmutov/npm-install@v1 - - run: npm run build + - run: npm run build:esm - run: npm run test:node env: DEBUG: "waku:nwaku*,waku:test*" @@ -184,7 +184,7 @@ jobs: cd nwaku ./build/wakunode2 --help - - run: npm run build + - run: npm run build:esm - run: npm run test:node env: DEBUG: "waku:nwaku*,waku:test*" diff --git a/package.json b/package.json index 4e21b7f49f..12a525a555 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "scripts": { "prepare": "husky install", "build": "npm run build --workspaces --if-present", + "build:esm": "npm run build:esm --workspaces --if-present", "size": "npm run build && size-limit", "fix": "npm run fix --workspaces --if-present", "check": "npm run check --workspaces --if-present", diff --git a/packages/interfaces/package.json b/packages/interfaces/package.json index b09a555338..81f1181a04 100644 --- a/packages/interfaces/package.json +++ b/packages/interfaces/package.json @@ -32,7 +32,8 @@ "privacy" ], "scripts": { - "build": "tsc", + "build": "run-s build:**", + "build:esm": "tsc", "fix": "run-s fix:*", "fix:prettier": "prettier . --write", "fix:lint": "eslint src --ext .ts --ext .cjs --fix",