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",