chore: migrate to pnpm; set size limits
This commit is contained in:
parent
0c5d4ef15f
commit
ce157f9f63
6 changed files with 3824 additions and 4490 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
. "$(dirname -- "$0")/_/husky.sh"
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
npm run lint
|
pnpm run lint
|
4478
package-lock.json
generated
4478
package-lock.json
generated
File diff suppressed because it is too large
Load diff
52
package.json
52
package.json
|
@ -25,16 +25,17 @@
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"preinstall": "npx only-allow pnpm",
|
||||||
"start": "npx simple-server .",
|
"start": "npx simple-server .",
|
||||||
"demo": "npx simple-server .",
|
"demo": "npx simple-server .",
|
||||||
"site": "npm start -w site",
|
"site": "pnpm --filter site start",
|
||||||
"build": "npm run clean && tsc && npm run copy:source",
|
"build": "pnpm run clean && tsc && pnpm run copy:source",
|
||||||
|
"size-limit": "pnpm run build && size-limit",
|
||||||
"clean": "rm -rf dist",
|
"clean": "rm -rf dist",
|
||||||
"copy:source": "esbuild --minify --bundle ./src/*.js ./src/utils/* --outdir=\"./dist\" --format=\"esm\"",
|
"copy:source": "esbuild --minify --bundle ./src/*.js ./src/utils/* --outdir=\"./dist\" --format=\"esm\"",
|
||||||
"pub": "npm run clean && npm run build && npm publish",
|
"pub": "pnpm run clean && pnpm run build && npm publish",
|
||||||
"pub:patch": "npm version patch && npm run pub",
|
"pub:patch": "npm version patch && pnpm run pub",
|
||||||
"pub:minor": "npm version minor && npm run pub",
|
"pub:minor": "npm version minor && pnpm run pub",
|
||||||
"check:size": "npm run build && size-limit ./dist/WebComponent.js",
|
|
||||||
"pretty": "prettier --write \"./**/*.{js,mjs,json}\"",
|
"pretty": "prettier --write \"./**/*.{js,mjs,json}\"",
|
||||||
"lint": "eslint . --config .eslintrc.cjs --ext .js,.mjs",
|
"lint": "eslint . --config .eslintrc.cjs --ext .js,.mjs",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install"
|
||||||
|
@ -56,11 +57,42 @@
|
||||||
"@size-limit/preset-small-lib": "^11.0.0",
|
"@size-limit/preset-small-lib": "^11.0.0",
|
||||||
"esbuild": "^0.19.9",
|
"esbuild": "^0.19.9",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
|
"husky": "^8.0.0",
|
||||||
"prettier": "^3.1.1",
|
"prettier": "^3.1.1",
|
||||||
"typescript": "^5.2.2",
|
"size-limit": "^11.0.2",
|
||||||
"husky": "^8.0.0"
|
"typescript": "^5.2.2"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"size-limit": [
|
||||||
"site"
|
{
|
||||||
|
"path": "./dist/WebComponent.js",
|
||||||
|
"limit": "1.5 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/html.js",
|
||||||
|
"limit": "0.6 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/attach-effect.js",
|
||||||
|
"limit": "0.1 KB"
|
||||||
|
}, {
|
||||||
|
"path": "./dist/utils/create-element.js",
|
||||||
|
"limit": "0.5 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/utils/deserialize.js",
|
||||||
|
"limit": "0.5 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/utils/serialize.js",
|
||||||
|
"limit": "0.5 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/utils/get-camel-case.js",
|
||||||
|
"limit": "0.5 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/utils/get-kebab-case.js",
|
||||||
|
"limit": "0.5 KB"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
3777
pnpm-lock.yaml
Normal file
3777
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
3
pnpm-workspace.yaml
Normal file
3
pnpm-workspace.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
packages:
|
||||||
|
# include packages in subfolders (e.g. apps/ and packages/)
|
||||||
|
- "site/**"
|
|
@ -7,7 +7,7 @@
|
||||||
"dev": "mcfly serve",
|
"dev": "mcfly serve",
|
||||||
"build": "mcfly build",
|
"build": "mcfly build",
|
||||||
"preview": "node .output/server/index.mjs",
|
"preview": "node .output/server/index.mjs",
|
||||||
"build:preview": "npm run build && npm run preview"
|
"build:preview": "pnpm run build && pnpm run preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mcflyjs/cli": "latest",
|
"@mcflyjs/cli": "latest",
|
||||||
|
|
Loading…
Reference in a new issue