From c2be0cd9e92b6fdaa9f43da86103c0e3e7711de0 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Tue, 1 Oct 2024 10:36:46 +0200 Subject: [PATCH 1/2] fix: provide correct fileending --- package-lock.json | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 610ff1f..21ccc2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "svgtofont": "^6.0.0" }, "bin": { - "gif": "dist/index.js" + "gif": "dist/index.cjs" }, "devDependencies": { "@types/fs-extra": "^11.0.4", diff --git a/package.json b/package.json index 4e0af56..8a5c9f8 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "license": "Apache-2.0", "bin": { - "@db-ui/gif": "dist/index.js" + "@db-ui/gif": "dist/index.cjs" }, "main": "index.js", "files": [ @@ -17,7 +17,7 @@ ], "scripts": { "build": "npm-run-all -p build:*", - "build:01_icon_fonts_common": "esbuild src/generate-icon-fonts/cli.ts --bundle --outfile=dist/index.js --platform=node --packages=external", + "build:01_icon_fonts_common": "esbuild src/generate-icon-fonts/cli.ts --bundle --outfile=dist/index.cjs --platform=node --packages=external", "build:02_icon_fonts_styles": "cpr src/generate-icon-fonts/styles dist/styles -o", "build:03_icon_fonts_templates": "cpr src/generate-icon-fonts/templates dist/templates -o", "lint": "eslint src --ext ts", From 5b844bfccb2d1971ec04439ef4b8c80a8dd4a8a2 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Tue, 1 Oct 2024 10:59:15 +0200 Subject: [PATCH 2/2] refactor: let's use esm --- package-lock.json | 2 +- package.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 21ccc2d..5e71e0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "svgtofont": "^6.0.0" }, "bin": { - "gif": "dist/index.cjs" + "gif": "dist/index.mjs" }, "devDependencies": { "@types/fs-extra": "^11.0.4", diff --git a/package.json b/package.json index 8a5c9f8..79fcba7 100644 --- a/package.json +++ b/package.json @@ -9,15 +9,15 @@ }, "license": "Apache-2.0", "bin": { - "@db-ui/gif": "dist/index.cjs" + "@db-ui/gif": "dist/index.mjs" }, - "main": "index.js", + "main": "dist/index.mjs", "files": [ "dist/" ], "scripts": { "build": "npm-run-all -p build:*", - "build:01_icon_fonts_common": "esbuild src/generate-icon-fonts/cli.ts --bundle --outfile=dist/index.cjs --platform=node --packages=external", + "build:01_icon_fonts_common": "esbuild src/generate-icon-fonts/cli.ts --bundle --outfile=dist/index.mjs --platform=node --packages=external --format=esm", "build:02_icon_fonts_styles": "cpr src/generate-icon-fonts/styles dist/styles -o", "build:03_icon_fonts_templates": "cpr src/generate-icon-fonts/templates dist/templates -o", "lint": "eslint src --ext ts",