Skip to content

Commit

Permalink
feat: 🎸 new version
Browse files Browse the repository at this point in the history
  • Loading branch information
huyikai committed Dec 6, 2023
1 parent f4f3c9d commit 0236f07
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore",
"lint:style": "stylelint \"./docs/**/*.{css,scss,vue,html}\" --fix",
"prepare": "husky install",
"serve": "vitepress serve docs"
"serve": "vitepress serve docs",
"commit": "git-cz"
},
"lint-staged": {
"*.{js,jsx,vue,ts}": [
Expand Down Expand Up @@ -51,6 +52,7 @@
"stylelint-config-standard": "^33.0.0",
"stylelint-order": "^6.0.3",
"vitepress": "^1.0.0-alpha.75",
"vue": "^3.2.45"
"vue": "^3.2.45",
"git-cz": "^4.9.0"
}
}
7 changes: 3 additions & 4 deletions packages/tree-conver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-conver",
"version": "0.0.94",
"version": "0.0.95",
"description": "Tree data conversion tool",
"keywords": [
"tree",
Expand All @@ -17,12 +17,11 @@
"type": "git",
"url": "git+https://github.com/huyikai/tree-conver.git"
},
"types": "lib/src/index.d.ts",
"types": "lib/types/index.d.ts",
"license": "MIT",
"author": "huyikai",
"type": "module",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"main": "lib/index.js",
"workspaces": [
"packages/*"
],
Expand Down
8 changes: 2 additions & 6 deletions packages/tree-conver/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';

export default {
input: 'src/index.ts',
output: [
{
file: 'lib/index.cjs.js',
format: 'cjs'
},
{
file: 'lib/index.esm.js',
file: 'lib/index.js',
format: 'esm',
sourcemap: true
},
Expand Down
4 changes: 2 additions & 2 deletions packages/tree-conver/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { arrayToTree } from './arrayToTree';
import { treeToArray } from './treeToArray';

export { arrayToTree } from './arrayToTree';
export { treeToArray } from './treeToArray';
export { generateTree } from './generateTree';

export default arrayToTree;
export default treeToArray;
7 changes: 4 additions & 3 deletions packages/tree-conver/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
// 启用esModuleInterop选项,使得默认导出的模块可以像命名导出一样被导入
"esModuleInterop": true,
"declaration": true, // 生成 `.d.ts` 文件
"outDir": "./lib", // 编译后生成的文件目录
"outDir": "./lib/types", // 编译后生成的文件目录
// 启用resolveJsonModule选项,使得可以import .json文件
"resolveJsonModule": true
}
}
},
"exclude": ["**/node_modules/**", "**/lib/**", "**.config.ts"]
}

0 comments on commit 0236f07

Please sign in to comment.