Skip to content

Commit

Permalink
remove single imports, move tsup config to file
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Dec 23, 2023
1 parent 786550d commit f50209d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
"description": "Feature-enhanced wrappers for the Storage and IndexedDB APIs",
"license": "MIT",
"scripts": {
"build:bundle": "tsup src/index.ts --out-dir=lib --format=esm --sourcemap --dts",
"build:storage": "tsup src/porridge.ts --out-dir=lib --format=esm --sourcemap --dts",
"build:db": "tsup src/porridge-db.ts --out-dir=lib --format=esm --sourcemap --dts",
"build": "npm-run-all --parallel build:*",
"dev": "npm run build:bundle -- --watch",
"build": "tsup",
"dev": "npm run build -- --watch",
"fix": "eslint --fix ./src",
"lint:json": "eslint ./*.json --ignore-path .gitignore",
"lint:md": "remark . --quiet --frail --ignore-path .gitignore",
Expand All @@ -25,12 +22,6 @@
".": {
"import": "./lib/index.js"
},
"./storage": {
"import": "./lib/porridge.js"
},
"./db": {
"import": "./lib/porridge-db.js"
},
"./types": {
"import": "./lib"
}
Expand Down
12 changes: 12 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'tsup';

export default defineConfig({
target: 'esnext',
clean: true,
dts: true,
entry: ['src/index.ts'],
format: 'esm',
minify: true,
outDir: 'lib',
treeshake: 'recommended'
});

0 comments on commit f50209d

Please sign in to comment.