From 3440a38e07b4668e2905591f63f088b0785c0789 Mon Sep 17 00:00:00 2001 From: m0ar Date: Mon, 15 Jan 2024 14:27:39 +0100 Subject: [PATCH] Tidy for npm publish --- packages/lib/.npmignore | 9 +++++++++ packages/lib/package.json | 2 +- packages/lib/tsconfig.build.json | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 packages/lib/.npmignore create mode 100644 packages/lib/tsconfig.build.json diff --git a/packages/lib/.npmignore b/packages/lib/.npmignore new file mode 100644 index 0000000..2632f3a --- /dev/null +++ b/packages/lib/.npmignore @@ -0,0 +1,9 @@ +node_modules +admin_seed.txt +local-data +composedb.config.json +test.config.json +*.tsbuildinfo +.vscode +dist/test/ +dist/scripts/ diff --git a/packages/lib/package.json b/packages/lib/package.json index c99bd5b..56d9ebe 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -8,7 +8,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "build": "rm -rf ./dist && tsc", + "build": "rm -rf ./dist && tsc --project tsconfig.build.json", "populate": "node --no-warnings=ExperimentalWarning --loader ts-node/esm scripts/populate.ts", "test": "export ADMIN_SEED=$(<../composedb/admin_seed.txt) && vitest --run --config vitest.config.ts" }, diff --git a/packages/lib/tsconfig.build.json b/packages/lib/tsconfig.build.json new file mode 100644 index 0000000..30d5275 --- /dev/null +++ b/packages/lib/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "test/**/*", + "vitest*", + "dist" + ] +}