From dcee55521b9ef4f55e107f3f8494dc1343c6fb06 Mon Sep 17 00:00:00 2001 From: Akash Askoolum Date: Mon, 23 Nov 2020 14:27:49 +0000 Subject: [PATCH] become package manager agnostic We don't want to force clients of this library to use npm or yarn. - Tweak the `prepare` directive to invoke `tsc` directly - Add the `files` directive to work around issue with yarn (see https://github.com/yarnpkg/yarn/issues/5235#issuecomment-571206092) --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 951c042b2a..8d7d5bb43e 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,17 @@ "version": "0.1.0", "main": "lib/index.js", "types": "lib/index.d.ts", + "files": [ + "src/**/*", + "lib/**/*" + ], "scripts": { "build": "tsc", "lint": "eslint src --ext .ts", "format": "prettier --write \"(src|test)/**/*.ts\"", "watch": "tsc -w", "test": "jest --detectOpenHandles --runInBand", - "prepare": "npm run build" + "prepare": "tsc" }, "devDependencies": { "@guardian/eslint-config-typescript": "^0.4.1",