From bfba337898d5b76f858864b7abde3489338f716e Mon Sep 17 00:00:00 2001 From: graphieros Date: Wed, 25 Sep 2024 19:48:23 +0200 Subject: [PATCH] Fix build & package --- copy-types.cjs | 1 + package-lock.json | 4 ++-- package.json | 20 +++++++++++++------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/copy-types.cjs b/copy-types.cjs index 519fa26..82e049e 100644 --- a/copy-types.cjs +++ b/copy-types.cjs @@ -27,6 +27,7 @@ fs.readdirSync(typesDir).forEach((file) => { const distFile = path.join(distTypesDir, file); fs.copyFileSync(srcFile, distFile); + fs.copyFileSync(srcFile, distFile.replace(/\.d\.ts$/, ".d.cts")); }); console.log("Types copied successfully."); diff --git a/package-lock.json b/package-lock.json index 5074b5b..e2e810a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "grid-plan", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "grid-plan", - "version": "1.1.0", + "version": "1.1.1", "license": "MIT", "devDependencies": { "@vitejs/plugin-vue": "^5.0.5", diff --git a/package.json b/package.json index 4130785..9885743 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grid-plan", - "version": "1.1.1", + "version": "1.1.2", "private": false, "type": "module", "description": "A Vue3 dynamic 2d grid component ideal to view and arrange elements on a room, datacenter or rack blueprint.", @@ -18,22 +18,28 @@ "author": "Alec Lloyd Probert", "repository": { "type": "git", - "url": "https://github.com/graphieros/grid-plan" + "url": "git+https://github.com/graphieros/grid-plan.git" }, "homepage": "https://grid-plan.graphieros.com/", "license": "MIT", "files": [ "dist" ], - "main": "./dist/grid-plan.umd.cjs", - "module": "./dist/grid-plan.js", "exports": { ".": { - "import": "./dist/grid-plan.js", - "export": "./dist/grid-plan.umd.cjs", - "types": "./dist/types/grid-plan.d.ts" + "import": { + "types": "./dist/types/grid-plan.d.ts", + "default": "./dist/grid-plan.js" + }, + "default": { + "types": "./dist/types/grid-plan.d.cts", + "default": "./dist/grid-plan.cjs" + } } }, + "main": "./dist/grid-plan.cjs", + "module": "./dist/grid-plan.js", + "types": "./dist/types/grid-plan.d.ts", "scripts": { "clean": "node cleanup.cjs", "dev": "node add-dev-dep.cjs && npm i && vite",