From c464ba68f0d03e5afea5ce0f069413e848e4c21f Mon Sep 17 00:00:00 2001 From: Adam Weeden Date: Sat, 20 Nov 2021 22:46:59 -0500 Subject: [PATCH] [E4E-30]: FIx the lack of a root index.js on build --- .gitignore | 1 + README.md | 2 ++ package.json | 2 +- tsconfig.json | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dd87e2d..ab57381 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules build +dist diff --git a/README.md b/README.md index 7a5f637..9f79f6c 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ const userSearch = (searchPattern: string) => { ## Releasing +Checking in the dist folder is not necessary as it will be built upon npm install by the downstream project. + After making any changes and merging them to main, please do the following: * Create a new branch from main and run `npm run update:version` diff --git a/package.json b/package.json index c2ee223..3ab0081 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "url": "git+https://github.com/nrccua/apollo-rest-utils.git" }, "scripts": { - "build": "npm run clean && tsc lib/**/*.ts --excludeFiles lib/**/*.test.ts --outDir dist --esModuleInterop --declaration", + "build": "npm run clean && tsc lib/**/*.ts lib/*.ts --excludeFiles lib/**/*.test.ts --outDir dist --esModuleInterop --declaration", "clean": "rm -rf dist", "clean:full": "npm run clean && rm -rf node_modules", "postinstall": "npm run build", diff --git a/tsconfig.json b/tsconfig.json index d297fc6..9efa937 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,5 +18,6 @@ "include": [ "./**/*", ], + "resolveJsonModule": true, "target": "es5", }