From 68c01641a17900fbcaf6878af2f36fb69a01f035 Mon Sep 17 00:00:00 2001 From: Tyler Arehart Date: Mon, 11 Dec 2023 17:14:22 -0800 Subject: [PATCH] Trying to get npm packaging working properly. --- .eslintignore | 1 + .gitignore | 1 + package.json | 7 +++++-- tsconfig.json | 2 +- tsconfig.release.json | 3 +-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.eslintignore b/.eslintignore index fc40c5a..abc7131 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ /**/*.js +/dist/**/* diff --git a/.gitignore b/.gitignore index 08b35db..309d6c9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ coverage # Transpiled files build/ +dist/ # VS Code .vscode diff --git a/package.json b/package.json index 697be92..fe68c82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aws-appconfig-poller", - "version": "0.0.3", + "version": "0.0.4", "description": "A wrapper around @aws-sdk/client-appconfigdata to provide background polling and caching.", "repository": { "type": "git", @@ -10,6 +10,9 @@ "engines": { "node": ">= 18.12 <21" }, + "main": "dist/src/poller.js", + "types": "dist/src/poller.d.ts", + "files": ["dist"], "devDependencies": { "@aws-sdk/credential-providers": "^3.470.0", "@types/jest": "~29.5", @@ -29,7 +32,7 @@ "yaml": "^2.3.4" }, "scripts": { - "clean": "rimraf coverage build tmp", + "clean": "rimraf coverage build tmp lib", "prebuild": "npm run lint", "build": "tsc -p tsconfig.json", "build:watch": "tsc -w -p tsconfig.json", diff --git a/tsconfig.json b/tsconfig.json index debd3bb..a852486 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "lib": ["ES2022"], "moduleResolution": "node16", "rootDir": ".", - "outDir": "build", + "outDir": "dist", "allowSyntheticDefaultImports": true, "importHelpers": true, "alwaysStrict": true, diff --git a/tsconfig.release.json b/tsconfig.release.json index f08638c..2afcd3a 100644 --- a/tsconfig.release.json +++ b/tsconfig.release.json @@ -1,8 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "sourceMap": false, - "removeComments": true + "declaration": true, }, "include": ["src/**/*"] }