@jeffchi/logger 2.0.0 → 2.3.4-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +22 -3
  2. package/package.json +19 -14
package/README.md CHANGED
@@ -129,10 +129,29 @@ export interface ILogOptions {
129
129
  > npm run test # 所有测试文件
130
130
  > ```
131
131
 
132
- ## License
132
+ ## 构建脚本
133
133
 
134
- MIT
134
+ 通过运行构建脚本,可实现不同的功能
135
135
 
136
+ ```bash
137
+ npm run name
136
138
  ```
137
139
 
138
- ```
140
+ | 脚本名称 | 说明 |
141
+ | --------------------------------------- | --------------------------------------------------------------------- |
142
+ | clear | 清理 `lib/` `docs/` `build/`临时目录 |
143
+ | doc | 利用 typedoc 生成 api 文档,位于`docs/`目录下 |
144
+ | dev | 启动开发模式 |
145
+ | build | 执行构建过程 |
146
+ | format | 利用 prettier 格式化 |
147
+ | lint | 依赖 tslint 对代码检查 |
148
+ | test | 依赖 jest 测试代码 |
149
+ | push | 用指定 message 提交代码并推送至远程 |
150
+ | version | 生成新的批次版本号,同步至无程仓库打标分支 |
151
+ | release `major`\|`minor`\|`patch` | 生成新的 `主`\|`次`\|`批` 版本号,推送远程仓库后,并发布至 npm 仓 |
152
+ | release:alpha `major`\|`minor`\|`patch` | 生成新的 `主`\|`次`\|`批` alpha 版本号,推送远程仓库后,并发布至 npm 仓 |
153
+ | release:rc `major`\|`minor`\|`patch` | 生成新的 `主`\|`次`\|`批` RC 版本号,推送远程仓库后,并发布至 npm 仓 |
154
+
155
+ ## License
156
+
157
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeffchi/logger",
3
- "version": "2.0.0",
3
+ "version": "2.3.4-rc.0",
4
4
  "main": "lib/index.cjs",
5
5
  "module": "lib/index.mjs",
6
6
  "types": "lib/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "debug"
26
26
  ],
27
27
  "scripts": {
28
- "clear": "rm -rf lib/ docs/",
28
+ "clear": "rm -rf lib/ docs/ build/",
29
29
  "doc": "typedoc --options typedoc.json",
30
30
  "dev": "rollup -c --watch",
31
31
  "build": "npm run clear && rollup -c",
@@ -33,22 +33,19 @@
33
33
  "format": "prettier --write \"src/**/*.ts\"",
34
34
  "lint": "tslint -p tsconfig.json",
35
35
  "test": "jest --config jestconfig.json",
36
- "prepublishOnly": "npm run test && npm run lint",
36
+ "prepush": "git add .",
37
+ "push": "git commit -m",
38
+ "postpush": "git push",
39
+ "prepublishOnly": "npm run test main && npm run lint",
37
40
  "preversion": "npm run lint",
38
- "version": "npm run format && git add .",
41
+ "version": "npm run format && git add -A src",
39
42
  "postversion": "git push && git push --tags",
40
- "prerelease": "npm run lint && npm run format && git add .",
41
- "release": "standard-version",
43
+ "release": "standard-version --release-as",
42
44
  "postrelease": "git push --follow-tags && npm publish",
43
- "prerelease:alpha": "npm run lint && npm run format",
44
- "release:alpha": "standard-version --prerelease alpha",
45
+ "release:alpha": "standard-version --prerelease alpha --release-as",
45
46
  "postrelease:alpha": "git push --follow-tags && npm publish --tag alpha",
46
- "prerelease:rc": "npm run lint && npm run format",
47
- "release:rc": "standard-version --prerelease rc",
48
- "postrelease:rc": "git push --follow-tags && npm publish --tag rc",
49
- "release:major": "npm run release -- --release-as major",
50
- "release:minor": "npm run release -- --release-as minor",
51
- "release:patch": "npm run release -- --release-as patch"
47
+ "release:rc": "standard-version --prerelease rc --release-as",
48
+ "postrelease:rc": "git push --follow-tags && npm publish --tag rc"
52
49
  },
53
50
  "author": "jeffery·chiang",
54
51
  "license": "MIT",
@@ -63,6 +60,11 @@
63
60
  "lib",
64
61
  "*.d.ts"
65
62
  ],
63
+ "standard-version": {
64
+ "scripts": {
65
+ "prerelease": "npm run format && git add -A ."
66
+ }
67
+ },
66
68
  "peerDependencies": {
67
69
  "date-fns": "^2.29.3"
68
70
  },
@@ -78,6 +80,8 @@
78
80
  "@types/jest": "^29.2.5",
79
81
  "@types/node": "^18.11.18",
80
82
  "babel-preset-env": "^1.7.0",
83
+ "commitizen": "^4.2.6",
84
+ "cz-conventional-changelog": "^3.3.0",
81
85
  "esbuild": "^0.17.0",
82
86
  "jest": "^29.3.1",
83
87
  "prettier": "^2.8.2",
@@ -86,6 +90,7 @@
86
90
  "rollup-plugin-dts": "^5.1.1",
87
91
  "rollup-plugin-esbuild": "^5.0.0",
88
92
  "rollup-plugin-typescript2": "^0.34.1",
93
+ "rollup-plugin-visualizer": "^5.9.0",
89
94
  "standard-version": "^9.5.0",
90
95
  "ts-jest": "^29.0.5",
91
96
  "tslib": "^2.4.1",