Skip to content

Commit

Permalink
feat: 打包工具换成 tsup
Browse files Browse the repository at this point in the history
  • Loading branch information
kmq116 committed Nov 25, 2024
1 parent 761ce59 commit 3365494
Show file tree
Hide file tree
Showing 7 changed files with 2,368 additions and 639 deletions.
4 changes: 4 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ export default defineBuildConfig({
rollup: {
emitCJS: true,
},
externals: [
'@types/geojson',
],
failOnWarn: false,
})
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/index'
28 changes: 12 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zrender-geo-converter",
"type": "module",
"version": "0.0.0",
"version": "0.0.1",
"packageManager": "[email protected]",
"description": "_description_",
"author": "kmq116 <[email protected]>",
Expand All @@ -17,28 +17,26 @@
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
"import": "./dist/index.js",
"require": "./dist/index.js"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"types": "./dist/index.d.cts",
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./dist/index.d.ts"
"./dist/index.d.cts"
]
}
},
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
"build": "unbuild --no-type-check",
"dev": "tsup --dts --watch",
"lint": "eslint .",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
Expand All @@ -47,6 +45,11 @@
"typecheck": "tsc --noEmit",
"prepare": "simple-git-hooks"
},
"dependencies": {
"@turf/turf": "^7.1.0",
"geojson": "^0.5.0",
"tsup": "^8.3.5"
},
"devDependencies": {
"@antfu/eslint-config": "^2.6.2",
"@antfu/ni": "^0.21.12",
Expand All @@ -58,16 +61,9 @@
"lint-staged": "^15.2.0",
"pnpm": "^8.14.0",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.3.3",
"unbuild": "^2.0.0",
"vite": "^5.0.11",
"vitest": "^1.1.3"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
Loading

0 comments on commit 3365494

Please sign in to comment.