pjj 0.2.1 → 0.2.3
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/bin.mjs +10 -0
- package/package.json +7 -8
- package/src/main.mjs +3 -2
- package/bin.js +0 -4
- package/index.mjs +0 -3
package/bin.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pjj",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3",
|
|
5
5
|
"description": "禁止在项目的根目录执行 npm publish,防止意外发布。该脚本命令需在 `prepublishOnly` ` 钩子中配置",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@qqi/dev-log": ">=0.1.0 <1.0.0",
|
|
9
|
-
"a-command": ">=2.1.
|
|
10
|
-
"a-js-tools": ">=0.
|
|
11
|
-
"a-node-tools": ">=2.2.
|
|
12
|
-
"color-pen": "
|
|
9
|
+
"a-command": ">=2.1.5 <3.0.0",
|
|
10
|
+
"a-js-tools": ">=0.6.0 <1.0.0",
|
|
11
|
+
"a-node-tools": ">=2.2.1 <3.0.0",
|
|
12
|
+
"color-pen": ">=1.2.2 <2.0.0"
|
|
13
13
|
},
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "🥜",
|
|
@@ -17,9 +17,8 @@
|
|
|
17
17
|
"url": "https://earthnut.dev"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
|
-
"bin.js",
|
|
21
20
|
"src",
|
|
22
|
-
"
|
|
21
|
+
"bin.mjs"
|
|
23
22
|
],
|
|
24
23
|
"keywords": [
|
|
25
24
|
"pjj"
|
|
@@ -38,6 +37,6 @@
|
|
|
38
37
|
"registry": "https://registry.npmjs.org/"
|
|
39
38
|
},
|
|
40
39
|
"bin": {
|
|
41
|
-
"pjj": "bin.
|
|
40
|
+
"pjj": "bin.mjs"
|
|
42
41
|
}
|
|
43
42
|
}
|
package/src/main.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { line } from './line.mjs';
|
|
|
5
5
|
import { _p } from 'a-node-tools';
|
|
6
6
|
import { dog } from './dog.mjs';
|
|
7
7
|
import { blackSpace } from './blackSpace.mjs';
|
|
8
|
+
import { isNode } from 'a-js-tools';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* 空行
|
|
@@ -14,7 +15,7 @@ const space = '\n'.repeat(3);
|
|
|
14
15
|
* 主程序入口
|
|
15
16
|
*/
|
|
16
17
|
function main() {
|
|
17
|
-
if (
|
|
18
|
+
if (isNode() && process.env.npm_lifecycle_event === script) {
|
|
18
19
|
_p(space);
|
|
19
20
|
_p(line());
|
|
20
21
|
_p();
|
|
@@ -29,7 +30,7 @@ function main() {
|
|
|
29
30
|
command.error();
|
|
30
31
|
}
|
|
31
32
|
else {
|
|
32
|
-
dog.error(
|
|
33
|
+
dog.error(isNode() && process.env.npm_lifecycle_event);
|
|
33
34
|
const m = ' 所以,看见这段文本,说明你哪里 ❌ 了 ';
|
|
34
35
|
_p('====================================');
|
|
35
36
|
_p('跳过了禁止发布,而且该命令可能不会显示在终端\n');
|
package/bin.js
DELETED
package/index.mjs
DELETED