diff --git a/package.json b/package.json index 5bee76a6f..fda3549e3 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,13 @@ ], "private": true, "scripts": { - "clean": "npx tsc --build --clean", - "build": "npx tsc --build", + "clean": "yarn workspaces foreach -pt run clean", + "build": "yarn workspaces foreach -pt run build", "//": "When using build:doc you need to specify the workspace. 'yarn run build:doc packages/shared/common' for example.", "build:doc": "./scripts/build-doc.sh $1", "lint": "npx eslint . --ext .ts", "lint:fix": "yarn run lint -- --fix", - "test": "npx jest", + "test": "echo Please run tests for individual packages.", "coverage": "npm run test -- --coverage", "contract-test-service": "npm --prefix contract-tests install && npm --prefix contract-tests start", "contract-test-harness": "curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/master/downloader/run.sh \\ | VERSION=v2 PARAMS=\"-url http://localhost:8000 -debug -stop-service-at-end $TEST_HARNESS_PARAMS\" sh", diff --git a/packages/sdk/cloudflare/package.json b/packages/sdk/cloudflare/package.json index 9b847fdc8..f463b37ba 100644 --- a/packages/sdk/cloudflare/package.json +++ b/packages/sdk/cloudflare/package.json @@ -28,6 +28,7 @@ "scripts": { "doc": "../../../scripts/build-doc.sh .", "build": "../../../scripts/build-package.sh", + "clean": "rimraf dist", "tsw": "yarn tsc --watch", "start": "rimraf dist && yarn tsw", "lint": "eslint . --ext .ts", diff --git a/packages/sdk/server-node/package.json b/packages/sdk/server-node/package.json index 8d3ab80cc..f06391279 100644 --- a/packages/sdk/server-node/package.json +++ b/packages/sdk/server-node/package.json @@ -19,6 +19,7 @@ "client" ], "scripts": { + "clean": "npx tsc --build --clean", "//": "We run the tests in-band because the FS tests work best sequential.", "test": "npx jest --ci --runInBand", "build": "npx tsc", diff --git a/packages/shared/common/package.json b/packages/shared/common/package.json index 43ec1f0d1..f5400e4de 100644 --- a/packages/shared/common/package.json +++ b/packages/shared/common/package.json @@ -21,6 +21,7 @@ "scripts": { "test": "npx jest --ci", "build": "npx tsc", + "clean": "npx tsc --build --clean", "lint": "npx eslint . --ext .ts", "lint:fix": "yarn run lint -- --fix" }, diff --git a/packages/shared/common/tsconfig.json b/packages/shared/common/tsconfig.json index 960ca914a..19e8b1e59 100644 --- a/packages/shared/common/tsconfig.json +++ b/packages/shared/common/tsconfig.json @@ -14,5 +14,5 @@ "declarationMap": true, // enables importers to jump to source "stripInternal": true }, - "exclude": ["**/*.test.ts", "__tests__"] + "exclude": ["**/*.test.ts", "dist", "node_modules", "__tests__"] } diff --git a/packages/shared/sdk-server-edge/package.json b/packages/shared/sdk-server-edge/package.json index f732bbbc7..2855b7f82 100644 --- a/packages/shared/sdk-server-edge/package.json +++ b/packages/shared/sdk-server-edge/package.json @@ -28,6 +28,7 @@ "doc": "../../../scripts/build-doc.sh .", "build": "../../../scripts/build-package.sh", "tsw": "yarn tsc --watch", + "clean": "rimraf dist", "start": "rimraf dist && yarn tsw", "lint": "eslint . --ext .ts", "prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore", diff --git a/packages/shared/sdk-server/package.json b/packages/shared/sdk-server/package.json index 4eda259f3..47e58646e 100644 --- a/packages/shared/sdk-server/package.json +++ b/packages/shared/sdk-server/package.json @@ -21,6 +21,7 @@ "scripts": { "test": "npx jest --ci", "build": "npx tsc", + "clean": "npx tsc --build --clean", "lint": "npx eslint . --ext .ts", "lint:fix": "yarn run lint -- --fix" }, diff --git a/packages/shared/sdk-server/tsconfig.json b/packages/shared/sdk-server/tsconfig.json index 960ca914a..19e8b1e59 100644 --- a/packages/shared/sdk-server/tsconfig.json +++ b/packages/shared/sdk-server/tsconfig.json @@ -14,5 +14,5 @@ "declarationMap": true, // enables importers to jump to source "stripInternal": true }, - "exclude": ["**/*.test.ts", "__tests__"] + "exclude": ["**/*.test.ts", "dist", "node_modules", "__tests__"] }