Skip to content

Commit

Permalink
move to tsup bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
willybrauner committed Sep 7, 2023
1 parent bba9b9d commit bb5a746
Show file tree
Hide file tree
Showing 9 changed files with 991 additions and 3,535 deletions.
2 changes: 1 addition & 1 deletion examples/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@wbe/debug": "^1.0.2"
"@wbe/debug": "^1.1.0"
},
"devDependencies": {
"vite": "^3.1.8"
Expand Down
12 changes: 8 additions & 4 deletions examples/browser/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { menu } from "./Menu"
import debug from "@wbe/debug"
import {menu} from "./Menu"
import debug, {couleur} from "@wbe/debug"

const log = debug("front:index")

log("index log", {props: "foo"});
log("test 2");
log("index log", {props: "foo"})
log("test 2")

console.log(couleur.bold("hello bold"))
menu()

2 changes: 1 addition & 1 deletion examples/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@wbe/debug": "^1.0.2"
"@wbe/debug": "latest"
}
}
33 changes: 20 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"description": "Tiny debug tool (~500 bytes) for terminal and browser inspired by visionmedia/debug API.",
"author": "Willy Brauner",
"license": "MIT",
"type": "commonjs",
"source": "src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.module.js",
"unpkg": "./dist/index.umd.js",
"types": "dist/index.d.ts",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"sideEffects": false,
"repository": {
"type": "git",
Expand All @@ -28,23 +26,32 @@
"access": "public"
},
"scripts": {
"build": "npm run clean && microbundle",
"build:watch": "microbundle watch --no-sourcemap",
"build": "tsup",
"build:watch": "tsup --watch --sourcemap",
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
"dev": "microbundle --watch",
"dev:example-browser": "pnpm --filter ./examples/browser run dev",
"dev:example-node": "DEBUG=* node examples/node/index.js",
"pre-publish": "npm run build && npm run test",
"test:watch": "vitest",
"test": "vitest --run"
},
"devDependencies": {
"microbundle": "^0.15.1",
"@size-limit/preset-small-lib": "^8.2.4",
"@types/node": "^18.11.2",
"size-limit": "^9.0.0",
"terser": "^5.19.4",
"tsup": "^7.2.0",
"typescript": "^4.8.4",
"vitest": "^0.24.3",
"@types/node": "^18.11.2"
"vitest": "^0.24.3"
},
"prettier": {
"semi": false
}
},
"size-limit": [
{
"name": "@wbe/debug",
"path": "dist/index.js",
"limit": "500 B"
}
]
}
Loading

0 comments on commit bb5a746

Please sign in to comment.