From 54300927bb0bccf419f13a1e7e46b307b464d832 Mon Sep 17 00:00:00 2001 From: Bernard Niset Date: Fri, 25 Oct 2024 20:47:53 +0200 Subject: [PATCH] chore: Improve library publication Release-As: 0.0.11 --- package.json | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 65dae1d..8023d78 100644 --- a/package.json +++ b/package.json @@ -10,19 +10,26 @@ }, "homepage": "https://github.com/bn3t/ssin-lib", "type": "module", - "main": "dist/lib/index.cjs", - "module": "dist/lib/index.js", + "main": "./dist/lib/index.js", + "module": "./dist/lib/index.js", + "types": "./dist/lib/index.d.ts", + "exports": { + ".": { + "types": "./dist/lib/index.d.ts", + "import": "./dist/lib/index.js", + "require": "./dist/lib/index.cjs" + } + }, "bin": { "ssin": "dist/ssin-cli.js" }, - "types": "dist/index.d.ts", "files": [ "dist" ], "scripts": { "build": "npm run lint && npm run build:check && npm run build:js", "build:check": "tsc --noEmit", - "build:js": "tsup-node --entry src/ssin-cli.ts --entry src/lib/index.ts --format cjs,esm --dts --sourcemap", + "build:js": "tsup-node --entry src/lib/index.ts --entry src/ssin-cli.ts --format cjs,esm --dts --sourcemap", "build:native": "npm run build:native-linux-x64 && npm run build:native-darwin-x64 && npm run build:native-darwin-arm64 && npm run build:native-windows-x64", "build:compress": "npm run build:compress-linux-x64 && npm run build:compress-darwin-x64 && npm run build:compress-darwin-arm64 && npm run build:compress-windows-x64", "build:compress-darwin-arm64": "cd dist-native && tar cfz ssin-darwin-arm64.tar.gz ssin-darwin-arm64",