fscr 6.1.1 → 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 CHANGED
@@ -35,14 +35,11 @@ const runCmd = async (app, argsList = []) => {
35
35
  };
36
36
  (async () => {
37
37
  clear();
38
- const argv = yargs(process.argv.slice(2)).usage("Usage: $0 <command> [options]")
39
-
40
- /**
41
- * fsr
42
- */.command("", "Choose a script runner command", yargs => {}, async function () {}).example(`${taskName("$0")}`, `${textDescription("Choose a script runner command")}`)
38
+ const yargsInstance = yargs(process.argv.slice(2)).usage("Usage: $0 <command> [options]")
43
39
 
44
40
  /**
45
41
  * fsr
42
+ * branch --
46
43
  */.command("branch", "Create new branch instead of Development", yargs => {}, async function () {
47
44
  await validateNotInDev();
48
45
  }).example(`${taskName("$0")}`, `${textDescription("Validates branch and creates new")}`)
@@ -182,15 +179,14 @@ const runCmd = async (app, argsList = []) => {
182
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) {
183
180
  let mdFile = argv._[1];
184
181
  await generateToc(mdFile);
185
- }).example(`${taskName("$0 toc")}`, `${textDescription("Generate updated Table of Contents on top of the fscripts.md file")}`).argv;
186
- if (argv._.length === 0) {
187
- (async function () {
188
- const choice = await optionList();
189
- if (choice) {
190
- await runCmd("yarn", ["fsr", choice]);
191
- } else {
192
- console.log(chalk.green.bold("See you soon!"));
193
- }
194
- })();
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
+ }
195
191
  }
196
192
  })();
@@ -14,7 +14,6 @@ import path from "path";
14
14
  import fs from "fs";
15
15
  let packagePath = path.resolve(process.cwd(), "package.json");
16
16
  const packageJsonAfter = JSON.parse(fs.readFileSync(packagePath));
17
- console.info("Console --- packageJsonAfter.name", packageJsonAfter.name);
18
17
  const config = new Conf({
19
18
  configName: packageJsonAfter.name
20
19
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fscr",
3
- "version": "6.1.1",
3
+ "version": "6.1.3",
4
4
  "description": "Runs the fscripts.md file",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -9,7 +9,6 @@
9
9
  "build": "run-p build:index build:lib",
10
10
  "build:index": "babel index.js --ignore 'node_modules' --out-file dist/index.js",
11
11
  "build:lib": "babel lib --ignore 'node_modules' --out-dir dist/lib --copy-files",
12
- "build:combined": "rimraf dist && run-p build:index build:lib && echo '✅ Distributable build complete in dist/'",
13
12
  "fsr": "node dist/index.js",
14
13
  "release": "run-s release:bump release:clean release:build release:publish",
15
14
  "old:release:build": "parcel build index.js --target node --no-cache --no-source-maps",