@0x-jerry/x 2.7.4 → 2.7.5
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/dist/{chunk-Q6TKVCKX.js → chunk-NZSFHG3Q.js} +1 -1
- package/dist/x.js +1 -1
- package/dist/xn.js +1 -1
- package/dist/xr.js +1 -1
- package/package.json +10 -10
- package/readme.md +94 -94
package/dist/x.js
CHANGED
package/dist/xn.js
CHANGED
package/dist/xr.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0x-jerry/x",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/0x-jerry/x.git"
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"decompress": "^4.2.1",
|
|
48
48
|
"fs-extra": "^11.3.0",
|
|
49
49
|
"global-agent": "^3.0.0",
|
|
50
|
-
"got": "^14.4.
|
|
50
|
+
"got": "^14.4.6",
|
|
51
51
|
"jsonc-parser": "^3.3.1",
|
|
52
|
-
"ora": "^8.
|
|
52
|
+
"ora": "^8.2.0",
|
|
53
53
|
"picocolors": "^1.1.1",
|
|
54
54
|
"prompts": "^2.4.2"
|
|
55
55
|
},
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"@biomejs/biome": "^1.9.4",
|
|
59
59
|
"@types/decompress": "^4.2.7",
|
|
60
60
|
"@types/fs-extra": "^11.0.4",
|
|
61
|
-
"@types/global-agent": "^
|
|
62
|
-
"@types/node": "^22.
|
|
61
|
+
"@types/global-agent": "^3.0.0",
|
|
62
|
+
"@types/node": "^22.13.8",
|
|
63
63
|
"@types/prompts": "^2.4.9",
|
|
64
|
-
"@vitest/coverage-v8": "^3.0.
|
|
65
|
-
"tsup": "^8.
|
|
66
|
-
"tsx": "^4.19.
|
|
67
|
-
"typescript": "^5.
|
|
68
|
-
"vitest": "^3.0.
|
|
64
|
+
"@vitest/coverage-v8": "^3.0.7",
|
|
65
|
+
"tsup": "^8.4.0",
|
|
66
|
+
"tsx": "^4.19.3",
|
|
67
|
+
"typescript": "^5.8.2",
|
|
68
|
+
"vitest": "^3.0.7"
|
|
69
69
|
}
|
|
70
70
|
}
|
package/readme.md
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
# X
|
|
2
|
-
|
|
3
|
-
Some useful command for myself.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
pnpm i -g @0x-jerry/x
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Run task `xr`
|
|
12
|
-
|
|
13
|
-
`xr` command can auto detect tasks in `package.json/scripts`, `deno.json/tasks`, and run it. you can also append any parameters.
|
|
14
|
-
|
|
15
|
-
Example: In a node project with `pnpm-lock.yaml`. And `package.json` has a script `"test": "vitest run"`
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
xr test test/*.ts
|
|
19
|
-
# equals
|
|
20
|
-
vitest run test/*.ts
|
|
21
|
-
|
|
22
|
-
# you can also execute binary file in `node_modules/.bin` folder.
|
|
23
|
-
xr vite --port 4004
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Example: In a deno project with `deno.json` or `deno.jsonc`. And have a task `"dev": "deno run -A main.ts"`
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
xr dev
|
|
30
|
-
# equals
|
|
31
|
-
deno run -A main.ts
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Dependency Manager `xn`
|
|
35
|
-
|
|
36
|
-
`xn` command can install modules by detect the correct tool, it detects lockfile to decide which dependency manager tools should be used.
|
|
37
|
-
|
|
38
|
-
Example: install packages in a node project with `pnpm-lock.yaml`
|
|
39
|
-
|
|
40
|
-
```sh
|
|
41
|
-
xn i lodash-es
|
|
42
|
-
# equals
|
|
43
|
-
pnpm i lodash-es
|
|
44
|
-
|
|
45
|
-
xn i lodash-es -D
|
|
46
|
-
# equals
|
|
47
|
-
pnpm i lodash-es -D
|
|
48
|
-
|
|
49
|
-
# -t/--types option support install @types/xx package in one command.
|
|
50
|
-
xn i lodash-es --types
|
|
51
|
-
# equals
|
|
52
|
-
pnpm i lodash-es && pnpm i @types/lodash-es -D
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Example: remove packages in a node project with `pnpm-lock.yaml`
|
|
56
|
-
|
|
57
|
-
```sh
|
|
58
|
-
xn rm lodash-es
|
|
59
|
-
# equals
|
|
60
|
-
pnpm uninstall lodash-es
|
|
61
|
-
|
|
62
|
-
xn rm lodash-es -D
|
|
63
|
-
# equals
|
|
64
|
-
pnpm uninstall lodash-es -D
|
|
65
|
-
|
|
66
|
-
# -t/--types option support remove @types/xx package in one command.
|
|
67
|
-
xn rm lodash-es --types
|
|
68
|
-
# equals
|
|
69
|
-
pnpm uninstall lodash-es @types/lodash-es
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
`xn` also support rust project.
|
|
73
|
-
|
|
74
|
-
Example: in a rust project with `Cargo.toml`
|
|
75
|
-
|
|
76
|
-
```sh
|
|
77
|
-
xn i log
|
|
78
|
-
# equals
|
|
79
|
-
cargo add log
|
|
80
|
-
|
|
81
|
-
xn rm log
|
|
82
|
-
# equals
|
|
83
|
-
cargo remove log
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Command Completions
|
|
87
|
-
|
|
88
|
-
Add this code to `~/.zshrc`
|
|
89
|
-
|
|
90
|
-
```zsh
|
|
91
|
-
source <(x completions)
|
|
92
|
-
source <(xr completions)
|
|
93
|
-
source <(xn completions)
|
|
94
|
-
```
|
|
1
|
+
# X
|
|
2
|
+
|
|
3
|
+
Some useful command for myself.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm i -g @0x-jerry/x
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Run task `xr`
|
|
12
|
+
|
|
13
|
+
`xr` command can auto detect tasks in `package.json/scripts`, `deno.json/tasks`, and run it. you can also append any parameters.
|
|
14
|
+
|
|
15
|
+
Example: In a node project with `pnpm-lock.yaml`. And `package.json` has a script `"test": "vitest run"`
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
xr test test/*.ts
|
|
19
|
+
# equals
|
|
20
|
+
vitest run test/*.ts
|
|
21
|
+
|
|
22
|
+
# you can also execute binary file in `node_modules/.bin` folder.
|
|
23
|
+
xr vite --port 4004
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Example: In a deno project with `deno.json` or `deno.jsonc`. And have a task `"dev": "deno run -A main.ts"`
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
xr dev
|
|
30
|
+
# equals
|
|
31
|
+
deno run -A main.ts
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Dependency Manager `xn`
|
|
35
|
+
|
|
36
|
+
`xn` command can install modules by detect the correct tool, it detects lockfile to decide which dependency manager tools should be used.
|
|
37
|
+
|
|
38
|
+
Example: install packages in a node project with `pnpm-lock.yaml`
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
xn i lodash-es
|
|
42
|
+
# equals
|
|
43
|
+
pnpm i lodash-es
|
|
44
|
+
|
|
45
|
+
xn i lodash-es -D
|
|
46
|
+
# equals
|
|
47
|
+
pnpm i lodash-es -D
|
|
48
|
+
|
|
49
|
+
# -t/--types option support install @types/xx package in one command.
|
|
50
|
+
xn i lodash-es --types
|
|
51
|
+
# equals
|
|
52
|
+
pnpm i lodash-es && pnpm i @types/lodash-es -D
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Example: remove packages in a node project with `pnpm-lock.yaml`
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
xn rm lodash-es
|
|
59
|
+
# equals
|
|
60
|
+
pnpm uninstall lodash-es
|
|
61
|
+
|
|
62
|
+
xn rm lodash-es -D
|
|
63
|
+
# equals
|
|
64
|
+
pnpm uninstall lodash-es -D
|
|
65
|
+
|
|
66
|
+
# -t/--types option support remove @types/xx package in one command.
|
|
67
|
+
xn rm lodash-es --types
|
|
68
|
+
# equals
|
|
69
|
+
pnpm uninstall lodash-es @types/lodash-es
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`xn` also support rust project.
|
|
73
|
+
|
|
74
|
+
Example: in a rust project with `Cargo.toml`
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
xn i log
|
|
78
|
+
# equals
|
|
79
|
+
cargo add log
|
|
80
|
+
|
|
81
|
+
xn rm log
|
|
82
|
+
# equals
|
|
83
|
+
cargo remove log
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Command Completions
|
|
87
|
+
|
|
88
|
+
Add this code to `~/.zshrc`
|
|
89
|
+
|
|
90
|
+
```zsh
|
|
91
|
+
source <(x completions)
|
|
92
|
+
source <(xr completions)
|
|
93
|
+
source <(xn completions)
|
|
94
|
+
```
|