Skip to content

Commit 5c3d546

Browse files
committed
update yo
1 parent 172d429 commit 5c3d546

File tree

7 files changed

+4098
-20
lines changed

7 files changed

+4098
-20
lines changed

packages/generator-reshow/generators/library/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@ module.exports = class extends YoGenerator {
7272
cp("package.json", null, this.payload);
7373
cp("src", null, this.payload);
7474
cp("Test.js", "src/__tests__/Test.js", this.payload);
75+
cp("yarn.lock");
7576
}
7677

7778
end() {
7879
if (!this.options?.skipInstall) {
79-
const { say } = YoHelper(this);
80-
say('Next you could try "npm run build" or "npm run test"');
80+
const { say, onExit } = YoHelper(this);
81+
onExit(()=>say('Next you could try "npm run build" or "npm run test"'));
8182
}
8283
}
8384
};

packages/generator-reshow/generators/library/templates/yarn.lock

+4,075
Large diffs are not rendered by default.

packages/generator-reshow/yarn.lock

+12-12
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,9 @@
560560
integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==
561561

562562
"@types/node@*":
563-
version "17.0.6"
564-
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.6.tgz#cc1589c9ee853b389e67e8fb4384e0f250a139b9"
565-
integrity sha512-+XBAjfZmmivILUzO0HwBJoYkAyyySSLg5KCGBDFLomJo0sV6szvVLAf4ANZZ0pfWzgEds5KmGLG9D5hfEqOhaA==
563+
version "17.0.7"
564+
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.7.tgz#4a53d8332bb65a45470a2f9e2611f1ced637a5cb"
565+
integrity sha512-1QUk+WAUD4t8iR+Oj+UgI8oJa6yyxaB8a8pHaC8uqM6RrS1qbL7bf3Pwl5rHv0psm2CuDErgho6v5N+G+5fwtQ==
566566

567567
"@types/node@^15.6.1":
568568
version "15.14.9"
@@ -1740,9 +1740,9 @@ ejs@^3.1.6:
17401740
jake "^10.6.1"
17411741

17421742
electron-to-chromium@^1.4.17:
1743-
version "1.4.31"
1744-
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.31.tgz#8d5ccc3f8253cd142b07afaa84f200fd33a7f2a6"
1745-
integrity sha512-t3XVQtk+Frkv6aTD4RRk0OqosU+VLe1dQFW83MDer78ZD6a52frgXuYOIsLYTQiH2Lm+JB2OKYcn7zrX+YGAiQ==
1743+
version "1.4.32"
1744+
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.32.tgz#7ad1e76692b307da454b7380cc882784962648b8"
1745+
integrity sha512-7QRVfMlccTFs7cZV3lB0k9Wcm6R6F+w1yBPX+xBAlAP/1oJIstxTev3A4r8REnUUAFph/cIB8y/EBU7PDbJTQw==
17461746

17471747
emoji-regex@^7.0.1:
17481748
version "7.0.3"
@@ -4341,9 +4341,9 @@ picocolors@^1.0.0:
43414341
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
43424342

43434343
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3:
4344-
version "2.3.0"
4345-
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
4346-
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
4344+
version "2.3.1"
4345+
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
4346+
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
43474347

43484348
pify@^2.3.0:
43494349
version "2.3.0"
@@ -6047,9 +6047,9 @@ yeoman-test@*:
60476047
temp-dir "^2.0.0"
60486048

60496049
yo-reshow@*:
6050-
version "0.2.7"
6051-
resolved "https://registry.yarnpkg.com/yo-reshow/-/yo-reshow-0.2.7.tgz#c64580dedfdc929cbff5df4dd40c76f34cbef528"
6052-
integrity sha512-XLClnkJ1u+jU22uFVxkq8v5VlzZK/HS8h0m8N1PyZflYy4srltYnPLs5dcbYDLfv0bv5wZLQNttrJdrgVyouNw==
6050+
version "0.2.8"
6051+
resolved "https://registry.yarnpkg.com/yo-reshow/-/yo-reshow-0.2.8.tgz#942f9e006c3589e19b0b67e659e1770e8cc961db"
6052+
integrity sha512-r7DxsdpHn36JmQXyDmwQ2nPvg+qxN7lClXUMCUNpTLYdGoSB7nKBELD4KgWEwa80oGE28hZWeashtFe563IvtA==
60536053
dependencies:
60546054
mkdirp "1.0.4"
60556055
parse-ini-string "*"

packages/yo-reshow/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.2.7",
2+
"version": "0.2.10",
33
"name": "yo-reshow",
44
"repository": {
55
"type": "git",

packages/yo-reshow/src/YoHelper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let lastAns;
1717
const exitCb = { current: null };
1818
const onExit = (cb) => cb && (exitCb.current = cb);
1919
process.once("exit", () => {
20-
exitCb.current();
20+
exitCb.current && exitCb.current();
2121
process.exit(0);
2222
});
2323

packages/yo-reshow/src/commonPrompt.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ const commonPrompt = {
77
{
88
type: "input",
99
name: "description",
10-
message: "Please input description for npm?",
10+
message: "Please input this description?",
1111
default: "",
1212
},
1313
{
1414
type: "input",
1515
name: "keyword",
16-
message: "Please input keyword for npm?",
16+
message: "Please input keyword?",
1717
default: "",
1818
},
1919
],

packages/yo-reshow/src/mainNamePrompt.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const mainNamePrompt = (oGen) => {
44
const { say, getDestFolderName, getAllAns, exit } = YoHelper(oGen);
55
oGen.argument("argMainName", { type: String, required: false });
66
const { argMainName, namespace } = oGen.options;
7+
oGen.options.subGeneratorName = namespace.split(":")[1];
8+
79
const prompts = [];
810
if (!argMainName) {
911
say(
@@ -20,7 +22,7 @@ const mainNamePrompt = (oGen) => {
2022
when: (response) => {
2123
const allAns = getAllAns(response);
2224
if (!allAns.isReady) {
23-
exit(()=>say("Exit for not ready to create folder."));
25+
exit(() => say("Exit for not ready to create folder."));
2426
}
2527
},
2628
}
@@ -29,7 +31,7 @@ const mainNamePrompt = (oGen) => {
2931
prompts.push({
3032
type: "input",
3133
name: "mainName",
32-
message: "Please confirm your generator naming? Or rename it.",
34+
message: "Please confirm your naming? Or rename it.",
3335
default: argMainName || getDestFolderName(),
3436
});
3537
return prompts;

0 commit comments

Comments
 (0)