fscr 6.1.2 → 6.1.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/dist/index.js +10 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ const runCmd = async (app, argsList = []) => {
|
|
|
35
35
|
};
|
|
36
36
|
(async () => {
|
|
37
37
|
clear();
|
|
38
|
-
const
|
|
38
|
+
const yargsInstance = yargs(process.argv.slice(2)).usage("Usage: $0 <command> [options]")
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* fsr
|
|
@@ -179,15 +179,14 @@ const runCmd = async (app, argsList = []) => {
|
|
|
179
179
|
}).example(`${taskName("$0 generate")}`, `${textDescription("Generates a sample.fscripts.md you can use as template for your fscripts file")}`).command("toc", "Generate updated Table of Contents on top of the fscripts.md file", () => {}, async function (argv) {
|
|
180
180
|
let mdFile = argv._[1];
|
|
181
181
|
await generateToc(mdFile);
|
|
182
|
-
}).example(`${taskName("$0 toc")}`, `${textDescription("Generate updated Table of Contents on top of the fscripts.md file")}`).
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
})();
|
|
182
|
+
}).example(`${taskName("$0 toc")}`, `${textDescription("Generate updated Table of Contents on top of the fscripts.md file")}`).help();
|
|
183
|
+
const argv = yargsInstance.argv;
|
|
184
|
+
if (argv && argv._ && argv._.length === 0) {
|
|
185
|
+
const choice = await optionList();
|
|
186
|
+
if (choice) {
|
|
187
|
+
await runCmd("yarn", ["fsr", choice]);
|
|
188
|
+
} else {
|
|
189
|
+
console.log(chalk.green.bold("See you soon!"));
|
|
190
|
+
}
|
|
192
191
|
}
|
|
193
192
|
})();
|