@clerc/plugin-version 1.0.2 → 1.1.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.
- package/README.md +2 -16
- package/dist/{index.js → index.mjs} +1 -4
- package/package.json +10 -15
- /package/dist/{index.d.ts → index.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -2,23 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@clerc/plugin-version)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Documenation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
$ npm install @clerc/plugin-version
|
|
11
|
-
$ yarn add @clerc/plugin-version
|
|
12
|
-
$ pnpm add @clerc/plugin-version
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## 🚀 Usage
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import { versionPlugin } from "@clerc/plugin-version";
|
|
19
|
-
|
|
20
|
-
cli.use(versionPlugin());
|
|
21
|
-
```
|
|
7
|
+
Read the [documentation](https://clerc.so1ve.dev/official-plugins/plugin-version.html) for more details.
|
|
22
8
|
|
|
23
9
|
## 📝 License
|
|
24
10
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { definePlugin } from "@clerc/core";
|
|
2
|
+
import { formatVersion } from "@clerc/utils";
|
|
2
3
|
|
|
3
|
-
//#region ../utils/src/index.ts
|
|
4
|
-
const formatVersion = (v) => v.length === 0 ? "" : v.startsWith("v") ? v : `v${v}`;
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
4
|
//#region src/index.ts
|
|
8
5
|
const versionPlugin = ({ command = true, flag = true } = {}) => definePlugin({ setup: (cli) => {
|
|
9
6
|
if (command) cli.command("version", "Prints current version", {}).on("version", () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerc/plugin-version",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Clerc plugin version",
|
|
@@ -25,28 +25,23 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"exports": {
|
|
28
|
-
".": "./dist/index.
|
|
29
|
-
|
|
30
|
-
"main": "./dist/index.js",
|
|
31
|
-
"module": "./dist/index.js",
|
|
32
|
-
"types": "dist/index.d.ts",
|
|
33
|
-
"typesVersions": {
|
|
34
|
-
"*": {
|
|
35
|
-
"*": [
|
|
36
|
-
"./dist/*",
|
|
37
|
-
"./dist/index.d.ts"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
28
|
+
".": "./dist/index.mjs",
|
|
29
|
+
"./package.json": "./package.json"
|
|
40
30
|
},
|
|
31
|
+
"main": "./dist/index.mjs",
|
|
32
|
+
"module": "./dist/index.mjs",
|
|
33
|
+
"types": "./dist/index.d.mts",
|
|
41
34
|
"files": [
|
|
42
35
|
"dist"
|
|
43
36
|
],
|
|
44
37
|
"publishConfig": {
|
|
45
38
|
"access": "public"
|
|
46
39
|
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@clerc/utils": "1.1.0"
|
|
42
|
+
},
|
|
47
43
|
"devDependencies": {
|
|
48
|
-
"@clerc/core": "1.0
|
|
49
|
-
"@clerc/utils": "1.0.2"
|
|
44
|
+
"@clerc/core": "1.1.0"
|
|
50
45
|
},
|
|
51
46
|
"peerDependencies": {
|
|
52
47
|
"@clerc/core": "*"
|
|
File without changes
|