From f94c999d77228b1972a39507f2d7499a8a8237f1 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 31 Mar 2021 14:39:53 +1100 Subject: [PATCH] feat!: publish with "main", src & tests, fix ts.map --- package.json | 5 +++-- tsconfig.json | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 09411b0..0b90004 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,9 @@ }, "scripts": { "build": "npm run build:js && npm run build:types", - "build:js": "npm_config_yes=true ipjs build --tests", - "build:types": "tsc --build", + "build:js": "npm_config_yes=true ipjs build --tests --main && npm run build:copy", + "build:copy": "cp -a tsconfig.json *.js *.ts lib/ test/ dist/", + "build:types": "npm run build:copy && cd dist && tsc --build", "prepublishOnly": "npm run build", "publish": "npm_config_yes=true npx ipjs@latest publish", "lint": "standard", diff --git a/tsconfig.json b/tsconfig.json index b382251..f33d6aa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,7 @@ "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "outDir": "dist/types", + "outDir": "types", "skipLibCheck": true, "stripInternal": true, "resolveJsonModule": true, @@ -39,7 +39,8 @@ "include": [ "lib", "." ], "exclude": [ "node_modules/", - "./dist/", + "esm/", + "cjs/", "example*.js" ], "compileOnSave": false