Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create separate size package to reduce shipped package.json size #137

Merged
merged 12 commits into from
Dec 9, 2023
17 changes: 2 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,21 @@
"dist",
"package.json"
],
"workspaces": [
"examples/*",
"tests"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"size": "size-limit",
"size": "pnpm --filter size size",
"test": "pnpm --filter tests test",
"test:ci": "pnpm --filter tests test:ci"
},
"devDependencies": {
"@size-limit/preset-small-lib": "11.0.1",
"prettier": "3.1.0",
"size-limit": "11.0.1",
"tsup": "8.0.1",
"typescript": "5.3.3",
"zustand": "4.4.7"
},
"peerDependencies": {
"zustand": "^4.3.0"
},
"size-limit": [
{
"limit": "1 kB",
"path": "dist/index.js",
"gzip": true
}
]
}
}
15 changes: 9 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
packages:
- "examples/*"
- "tests"
- "size"
19 changes: 19 additions & 0 deletions size/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "size",
"version": "0.0.0",
"private": true,
"scripts": {
"size": "size-limit"
},
"devDependencies": {
"@size-limit/preset-small-lib": "11.0.1",
"size-limit": "11.0.1"
},
"size-limit": [
{
"limit": "1 kB",
"path": "../dist/index.js",
"gzip": true
}
]
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Zundo",
"display": "zundo",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
Expand Down