From 4d354900ac72f16336ae051e47507cbd741c77b7 Mon Sep 17 00:00:00 2001 From: majh Date: Tue, 7 Feb 2023 18:24:20 +0800 Subject: [PATCH] update build --- .scripts/build.sh | 2 +- package.json | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.scripts/build.sh b/.scripts/build.sh index 1b1c494..5c4aecc 100755 --- a/.scripts/build.sh +++ b/.scripts/build.sh @@ -8,4 +8,4 @@ set -eu -yarn build-all +yarn build diff --git a/package.json b/package.json index 667ec93..2828261 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ ".": { "import": "./dist/main.es.js", "require": "./dist/cli.js" + }, + "./src/*": { + "import": "./src/*" } }, "files": [ @@ -21,10 +24,10 @@ "esbuild-main:dev": "esbuild src/main.ts --platform=browser --global-name=shirtinyLogger --bundle --sourcemap=external --outfile=dist/main.dev.js", "test": "jest", "lint": "eslint --max-warnings 0 . --ext .ts", - "build": "tsc -p tsconfig.json", + "build-type": "tsc -p tsconfig.json", "clean": "shx rm -rf dist build", "ts-node": "ts-node", - "build-all": "npm run clean && npm run build && npm run esbuild-node && npm run esbuild-browser && npm run esbuild-esm", + "build": "npm run clean && npm run build-type && npm run esbuild-node && npm run esbuild-browser && npm run esbuild-esm", "esbuild-browser": "esbuild src/browser.ts --platform=browser --global-name=ShirtinyLogger --bundle --minify --outfile=dist/main.browser.js", "esbuild-browser:dev": "esbuild src/browser.ts --platform=browser --global-name=ShirtinyLogger --bundle --sourcemap=external --outfile=dist/main.browser.js", "esbuild-node": "esbuild src/cli.ts --bundle --platform=node --minify --outfile=dist/cli.js",