From bdc6f016b49c047e2750a0a93b9d8072aed8609a Mon Sep 17 00:00:00 2001 From: Etienne Dldc Date: Thu, 24 Jun 2021 10:10:02 +0200 Subject: [PATCH] Ignore tests in build --- package.json | 5 +++-- tsconfig.build.json | 5 +++++ tsconfig.json | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 tsconfig.build.json diff --git a/package.json b/package.json index 1fe01b0..96de4bc 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,11 @@ "dist" ], "scripts": { - "build": "tsc", + "build": "tsc -p ./tsconfig.build.json", "lint": "ts-standard", + "typecheck": "tsc --noEmit", "lint:fix": "ts-standard --fix", - "prepublish": "tsc", + "prepublish": "yarn build", "release": "yarn test && yarn build && np", "test": "ts-standard && c8 --reporter=html --reporter=text ava", "test:watch": "ava --watch" diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..5e4e789 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./tsconfig.json", + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"] +} diff --git a/tsconfig.json b/tsconfig.json index 515e08b..c48bcf2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { "target": "es5", "module": "ES2020",