create-vuepress-theme-plume 1.0.0-rc.95 → 1.0.0-rc.97
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/lib/index.js
CHANGED
|
@@ -399,21 +399,27 @@ async function generate(mode, data) {
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
if (data.git)
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
402
|
+
if (data.git) {
|
|
403
|
+
const gitFiles = await readFiles(getTemplate("git"));
|
|
404
|
+
if (mode === 0 /* init */) {
|
|
405
|
+
const gitignorePath = path3.join(cwd, ".gitignore");
|
|
406
|
+
const docs = data.docsDir;
|
|
407
|
+
if (fs2.existsSync(gitignorePath)) {
|
|
408
|
+
const content = await fs2.promises.readFile(gitignorePath, "utf-8");
|
|
409
|
+
fileList.push({
|
|
410
|
+
filepath: ".gitignore",
|
|
411
|
+
content: `${content}
|
|
412
412
|
${docs}/.vuepress/.cache
|
|
413
413
|
${docs}/.vuepress/.temp
|
|
414
414
|
${docs}/.vuepress/dist
|
|
415
415
|
`
|
|
416
|
-
|
|
416
|
+
});
|
|
417
|
+
fileList.push(...gitFiles.filter(({ filepath }) => filepath !== ".gitignore"));
|
|
418
|
+
} else {
|
|
419
|
+
fileList.push(...gitFiles);
|
|
420
|
+
}
|
|
421
|
+
} else {
|
|
422
|
+
fileList.push(...gitFiles);
|
|
417
423
|
}
|
|
418
424
|
}
|
|
419
425
|
if (data.deploy !== "custom" /* custom */) {
|
|
@@ -505,5 +511,5 @@ var cli = cac("create-vuepress-theme-plume");
|
|
|
505
511
|
cli.command("[root]", "create a new vuepress-theme-plume project / \u521B\u5EFA\u65B0\u7684 vuepress-theme-plume \u9879\u76EE").action((root) => run(1 /* create */, root));
|
|
506
512
|
cli.command("init [root]", "Initial vuepress-theme-plume in the existing project / \u5728\u73B0\u6709\u9879\u76EE\u4E2D\u521D\u59CB\u5316 vuepress-theme-plume").action((root) => run(0 /* init */, root));
|
|
507
513
|
cli.help();
|
|
508
|
-
cli.version("1.0.0-rc.
|
|
514
|
+
cli.version("1.0.0-rc.96");
|
|
509
515
|
cli.parse();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vuepress-theme-plume",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.97",
|
|
5
5
|
"description": "The cli for create vuepress-theme-plume's project",
|
|
6
6
|
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
|
|
7
7
|
"license": "MIT",
|