From 1af46be1d1901951f606146560e8d98ed5b4164a Mon Sep 17 00:00:00 2001 From: Dor Shtaif Date: Tue, 3 Aug 2021 20:52:11 +0300 Subject: [PATCH] corrections and adjustments for building and publishing TypeScript (#7) --- .gitignore | 2 +- package.json | 6 ++++-- tsconfig.json | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0732bb1..62908ae 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ /coverage # production -/build +/dist # misc .DS_Store diff --git a/package.json b/package.json index f56ff49..0c17bea 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,12 @@ }, "scripts": { "test": "ts-mocha", - "code-check": "yarn run test && tsc --noEmit" + "code-check": "yarn run test && tsc --noEmit", + "build": "rm -rf ./dist && tsc", + "prepublishOnly": "yarn build" }, "files": [ - "./dist" + "dist" ], "devDependencies": { "@tsconfig/node10": "^1.0.8", diff --git a/tsconfig.json b/tsconfig.json index d0e64e5..96e5d41 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,8 +6,7 @@ "./src/**/*.js" ], "exclude": [ - "**/*.spec.ts", - "**/*.test.ts" + "**/spec/**/*" ], "compilerOptions": { "outDir": "./dist",