@xylabs/ts-scripts-react-yarn3 3.15.7 → 3.15.8
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/actions/analyze.cjs +3 -1
- package/dist/actions/analyze.cjs.map +1 -1
- package/dist/actions/analyze.mjs +3 -1
- package/dist/actions/analyze.mjs.map +1 -1
- package/dist/actions/eject.cjs +3 -1
- package/dist/actions/eject.cjs.map +1 -1
- package/dist/actions/eject.mjs +3 -1
- package/dist/actions/eject.mjs.map +1 -1
- package/dist/actions/index.cjs +77 -11
- package/dist/actions/index.cjs.map +1 -1
- package/dist/actions/index.mjs +67 -5
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/sitemap.cjs +3 -1
- package/dist/actions/sitemap.cjs.map +1 -1
- package/dist/actions/sitemap.mjs +3 -1
- package/dist/actions/sitemap.mjs.map +1 -1
- package/dist/actions/start.cjs +3 -1
- package/dist/actions/start.cjs.map +1 -1
- package/dist/actions/start.mjs +3 -1
- package/dist/actions/start.mjs.map +1 -1
- package/dist/actions/test.cjs +3 -1
- package/dist/actions/test.cjs.map +1 -1
- package/dist/actions/test.mjs +3 -1
- package/dist/actions/test.mjs.map +1 -1
- package/dist/bin/analyze.cjs +2 -0
- package/dist/bin/analyze.cjs.map +1 -1
- package/dist/bin/analyze.mjs +2 -0
- package/dist/bin/analyze.mjs.map +1 -1
- package/dist/bin/build-ci.cjs +2 -0
- package/dist/bin/build-ci.cjs.map +1 -1
- package/dist/bin/build-ci.mjs +2 -0
- package/dist/bin/build-ci.mjs.map +1 -1
- package/dist/bin/build.cjs +2 -0
- package/dist/bin/build.cjs.map +1 -1
- package/dist/bin/build.mjs +2 -0
- package/dist/bin/build.mjs.map +1 -1
- package/dist/bin/clean.cjs +2 -0
- package/dist/bin/clean.cjs.map +1 -1
- package/dist/bin/clean.mjs +2 -0
- package/dist/bin/clean.mjs.map +1 -1
- package/dist/bin/compile.cjs +2 -0
- package/dist/bin/compile.cjs.map +1 -1
- package/dist/bin/compile.mjs +2 -0
- package/dist/bin/compile.mjs.map +1 -1
- package/dist/bin/cycle.cjs +2 -0
- package/dist/bin/cycle.cjs.map +1 -1
- package/dist/bin/cycle.mjs +2 -0
- package/dist/bin/cycle.mjs.map +1 -1
- package/dist/bin/dead.cjs +2 -0
- package/dist/bin/dead.cjs.map +1 -1
- package/dist/bin/dead.mjs +2 -0
- package/dist/bin/dead.mjs.map +1 -1
- package/dist/bin/deps.cjs +2 -0
- package/dist/bin/deps.cjs.map +1 -1
- package/dist/bin/deps.mjs +2 -0
- package/dist/bin/deps.mjs.map +1 -1
- package/dist/bin/eject.cjs +2 -0
- package/dist/bin/eject.cjs.map +1 -1
- package/dist/bin/eject.mjs +2 -0
- package/dist/bin/eject.mjs.map +1 -1
- package/dist/bin/fix.cjs +2 -0
- package/dist/bin/fix.cjs.map +1 -1
- package/dist/bin/fix.mjs +2 -0
- package/dist/bin/fix.mjs.map +1 -1
- package/dist/bin/gitlint-fix.cjs +2 -0
- package/dist/bin/gitlint-fix.cjs.map +1 -1
- package/dist/bin/gitlint-fix.mjs +2 -0
- package/dist/bin/gitlint-fix.mjs.map +1 -1
- package/dist/bin/gitlint.cjs +2 -0
- package/dist/bin/gitlint.cjs.map +1 -1
- package/dist/bin/gitlint.mjs +2 -0
- package/dist/bin/gitlint.mjs.map +1 -1
- package/dist/bin/license.cjs +2 -0
- package/dist/bin/license.cjs.map +1 -1
- package/dist/bin/license.mjs +2 -0
- package/dist/bin/license.mjs.map +1 -1
- package/dist/bin/lint-clean.cjs +2 -0
- package/dist/bin/lint-clean.cjs.map +1 -1
- package/dist/bin/lint-clean.mjs +2 -0
- package/dist/bin/lint-clean.mjs.map +1 -1
- package/dist/bin/lint-fast.cjs +2 -0
- package/dist/bin/lint-fast.cjs.map +1 -1
- package/dist/bin/lint-fast.mjs +2 -0
- package/dist/bin/lint-fast.mjs.map +1 -1
- package/dist/bin/lint-profile.cjs +2 -0
- package/dist/bin/lint-profile.cjs.map +1 -1
- package/dist/bin/lint-profile.mjs +2 -0
- package/dist/bin/lint-profile.mjs.map +1 -1
- package/dist/bin/lint.cjs +2 -0
- package/dist/bin/lint.cjs.map +1 -1
- package/dist/bin/lint.mjs +2 -0
- package/dist/bin/lint.mjs.map +1 -1
- package/dist/bin/package/clean-outputs.cjs +2 -0
- package/dist/bin/package/clean-outputs.cjs.map +1 -1
- package/dist/bin/package/clean-outputs.mjs +2 -0
- package/dist/bin/package/clean-outputs.mjs.map +1 -1
- package/dist/bin/package/clean-typescript.cjs +2 -0
- package/dist/bin/package/clean-typescript.cjs.map +1 -1
- package/dist/bin/package/clean-typescript.mjs +2 -0
- package/dist/bin/package/clean-typescript.mjs.map +1 -1
- package/dist/bin/package/clean.cjs +2 -0
- package/dist/bin/package/clean.cjs.map +1 -1
- package/dist/bin/package/clean.mjs +2 -0
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile-only.cjs +2 -0
- package/dist/bin/package/compile-only.cjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +2 -0
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.cjs +2 -0
- package/dist/bin/package/compile-tsup.cjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +2 -0
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.cjs +2 -0
- package/dist/bin/package/compile.cjs.map +1 -1
- package/dist/bin/package/compile.mjs +2 -0
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.cjs +2 -0
- package/dist/bin/package/copy-assets-cjs.cjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.mjs +2 -0
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.cjs +2 -0
- package/dist/bin/package/copy-assets-esm.cjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.mjs +2 -0
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
- package/dist/bin/package/deps.cjs +2 -0
- package/dist/bin/package/deps.cjs.map +1 -1
- package/dist/bin/package/deps.mjs +2 -0
- package/dist/bin/package/deps.mjs.map +1 -1
- package/dist/bin/package/gen-docs.cjs +2 -0
- package/dist/bin/package/gen-docs.cjs.map +1 -1
- package/dist/bin/package/gen-docs.mjs +2 -0
- package/dist/bin/package/gen-docs.mjs.map +1 -1
- package/dist/bin/package/publint.cjs +2 -0
- package/dist/bin/package/publint.cjs.map +1 -1
- package/dist/bin/package/publint.mjs +2 -0
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.cjs +2 -0
- package/dist/bin/package/recompile.cjs.map +1 -1
- package/dist/bin/package/recompile.mjs +2 -0
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/rebuild.cjs +2 -0
- package/dist/bin/rebuild.cjs.map +1 -1
- package/dist/bin/rebuild.mjs +2 -0
- package/dist/bin/rebuild.mjs.map +1 -1
- package/dist/bin/reinstall.cjs +2 -0
- package/dist/bin/reinstall.cjs.map +1 -1
- package/dist/bin/reinstall.mjs +2 -0
- package/dist/bin/reinstall.mjs.map +1 -1
- package/dist/bin/relint.cjs +2 -0
- package/dist/bin/relint.cjs.map +1 -1
- package/dist/bin/relint.mjs +2 -0
- package/dist/bin/relint.mjs.map +1 -1
- package/dist/bin/sitemap.cjs +2 -0
- package/dist/bin/sitemap.cjs.map +1 -1
- package/dist/bin/sitemap.mjs +2 -0
- package/dist/bin/sitemap.mjs.map +1 -1
- package/dist/bin/sonar.cjs +2 -0
- package/dist/bin/sonar.cjs.map +1 -1
- package/dist/bin/sonar.mjs +2 -0
- package/dist/bin/sonar.mjs.map +1 -1
- package/dist/bin/start.cjs +2 -0
- package/dist/bin/start.cjs.map +1 -1
- package/dist/bin/start.mjs +2 -0
- package/dist/bin/start.mjs.map +1 -1
- package/dist/bin/test.cjs +2 -0
- package/dist/bin/test.cjs.map +1 -1
- package/dist/bin/test.mjs +2 -0
- package/dist/bin/test.mjs.map +1 -1
- package/dist/bin/tsconfig-gen-clean.cjs +2 -0
- package/dist/bin/tsconfig-gen-clean.cjs.map +1 -1
- package/dist/bin/tsconfig-gen-clean.mjs +2 -0
- package/dist/bin/tsconfig-gen-clean.mjs.map +1 -1
- package/dist/bin/tsconfig-gen.cjs +2 -0
- package/dist/bin/tsconfig-gen.cjs.map +1 -1
- package/dist/bin/tsconfig-gen.mjs +2 -0
- package/dist/bin/tsconfig-gen.mjs.map +1 -1
- package/dist/bin/up.cjs +2 -0
- package/dist/bin/up.cjs.map +1 -1
- package/dist/bin/up.mjs +2 -0
- package/dist/bin/up.mjs.map +1 -1
- package/dist/bin/updo.cjs +2 -0
- package/dist/bin/updo.cjs.map +1 -1
- package/dist/bin/updo.mjs +2 -0
- package/dist/bin/updo.mjs.map +1 -1
- package/dist/bin/xy.cjs +105 -2
- package/dist/bin/xy.cjs.map +1 -1
- package/dist/bin/xy.mjs +83 -1
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/bin/yarn3only.cjs +2 -0
- package/dist/bin/yarn3only.cjs.map +1 -1
- package/dist/bin/yarn3only.mjs +2 -0
- package/dist/bin/yarn3only.mjs.map +1 -1
- package/dist/index.cjs +119 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +98 -2
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.cjs +100 -3
- package/dist/lib/index.cjs.map +1 -1
- package/dist/lib/index.mjs +84 -1
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/xyReact.cjs +58 -8
- package/dist/lib/xyReact.cjs.map +1 -1
- package/dist/lib/xyReact.mjs +52 -2
- package/dist/lib/xyReact.mjs.map +1 -1
- package/package.json +4 -4
- package/tsconfig.build.json +29 -0
- package/tsup.config.ts +13 -3
package/dist/bin/xy.mjs
CHANGED
|
@@ -1,5 +1,87 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
+
|
|
5
|
+
// src/lib/xyReact.ts
|
|
6
|
+
import { xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from "@xylabs/ts-scripts-yarn3";
|
|
7
|
+
import chalk from "chalk";
|
|
8
|
+
|
|
9
|
+
// src/actions/analyze.ts
|
|
10
|
+
import { runSteps } from "@xylabs/ts-scripts-yarn3";
|
|
11
|
+
var analyze = /* @__PURE__ */ __name(() => {
|
|
12
|
+
return runSteps("Analyze", [
|
|
13
|
+
[
|
|
14
|
+
"yarn",
|
|
15
|
+
[
|
|
16
|
+
"source-map-explorer",
|
|
17
|
+
"build/static/js/*.ts"
|
|
18
|
+
]
|
|
19
|
+
]
|
|
20
|
+
]);
|
|
21
|
+
}, "analyze");
|
|
22
|
+
|
|
23
|
+
// src/actions/eject.ts
|
|
24
|
+
import { runSteps as runSteps2 } from "@xylabs/ts-scripts-yarn3";
|
|
25
|
+
var eject = /* @__PURE__ */ __name(() => {
|
|
26
|
+
return runSteps2("Eject", [
|
|
27
|
+
[
|
|
28
|
+
"yarn",
|
|
29
|
+
"react-scripts eject"
|
|
30
|
+
]
|
|
31
|
+
]);
|
|
32
|
+
}, "eject");
|
|
33
|
+
|
|
34
|
+
// src/actions/sitemap.ts
|
|
35
|
+
import { runSteps as runSteps3 } from "@xylabs/ts-scripts-yarn3";
|
|
36
|
+
var sitemap = /* @__PURE__ */ __name(() => {
|
|
37
|
+
return runSteps3("Sitemap", [
|
|
38
|
+
[
|
|
39
|
+
"ts-node-script",
|
|
40
|
+
"./scripts/sitemap.ts"
|
|
41
|
+
]
|
|
42
|
+
]);
|
|
43
|
+
}, "sitemap");
|
|
44
|
+
|
|
45
|
+
// src/actions/start.ts
|
|
46
|
+
import { runSteps as runSteps4 } from "@xylabs/ts-scripts-yarn3";
|
|
47
|
+
var start = /* @__PURE__ */ __name(() => {
|
|
48
|
+
return runSteps4("Start", [
|
|
49
|
+
[
|
|
50
|
+
"yarn",
|
|
51
|
+
"react-scripts start"
|
|
52
|
+
]
|
|
53
|
+
]);
|
|
54
|
+
}, "start");
|
|
55
|
+
|
|
56
|
+
// src/lib/xyReact.ts
|
|
57
|
+
var xyReact = /* @__PURE__ */ __name(async () => {
|
|
58
|
+
return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions()))))).command("analyze", "Analyze - Analyze Bundles", (yargs) => {
|
|
59
|
+
return yargs;
|
|
60
|
+
}, (argv) => {
|
|
61
|
+
if (argv.verbose) console.log("Analyzing");
|
|
62
|
+
process.exitCode = analyze();
|
|
63
|
+
}).command("eject", "Eject - Eject React project", (yargs) => {
|
|
64
|
+
return yargs;
|
|
65
|
+
}, (argv) => {
|
|
66
|
+
if (argv.verbose) console.log("Ejecting");
|
|
67
|
+
process.exitCode = eject();
|
|
68
|
+
}).command("sitemap", "Sitemap - Generate sitemap for the project", (yargs) => {
|
|
69
|
+
return yargs;
|
|
70
|
+
}, (argv) => {
|
|
71
|
+
if (argv.verbose) console.log("Generating Sitemap");
|
|
72
|
+
process.exitCode = sitemap();
|
|
73
|
+
}).command("start", "Start - Start project in browser", (yargs) => {
|
|
74
|
+
return yargs;
|
|
75
|
+
}, (argv) => {
|
|
76
|
+
if (argv.verbose) console.log("Starting");
|
|
77
|
+
process.exitCode = start();
|
|
78
|
+
}).demandCommand(1).command("*", "", () => {
|
|
79
|
+
console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`));
|
|
80
|
+
console.log(chalk.gray("Try 'yarn xy --help' for list of commands"));
|
|
81
|
+
}).help().argv;
|
|
82
|
+
}, "xyReact");
|
|
83
|
+
|
|
84
|
+
// src/bin/xy.ts
|
|
3
85
|
xyReact().then(() => {
|
|
4
86
|
process.exit(0);
|
|
5
87
|
}).catch((error) => {
|
package/dist/bin/xy.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/xy.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { xyReact } from '../lib/index.ts'\n\nxyReact()\n .then(() => {\n process.exit(0)\n })\n .catch((error) => {\n console.error(error)\n process.exit(1)\n })\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/lib/xyReact.ts","../../src/actions/analyze.ts","../../src/actions/eject.ts","../../src/actions/sitemap.ts","../../src/actions/start.ts","../../src/bin/xy.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from '@xylabs/ts-scripts-yarn3'\nimport chalk from 'chalk'\n\nimport { analyze, eject, sitemap, start } from '../actions/index.ts'\n\nexport const xyReact = async () => {\n return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions())))))\n .command(\n 'analyze',\n 'Analyze - Analyze Bundles',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Analyzing')\n process.exitCode = analyze()\n },\n )\n .command(\n 'eject',\n 'Eject - Eject React project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Ejecting')\n process.exitCode = eject()\n },\n )\n .command(\n 'sitemap',\n 'Sitemap - Generate sitemap for the project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Generating Sitemap')\n process.exitCode = sitemap()\n },\n )\n .command(\n 'start',\n 'Start - Start project in browser',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Starting')\n process.exitCode = start()\n },\n )\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .help().argv\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const analyze = () => {\n return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.ts']]])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const eject = () => {\n return runSteps('Eject', [['yarn', 'react-scripts eject']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const sitemap = () => {\n return runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const start = () => {\n return runSteps('Start', [['yarn', 'react-scripts start']])\n}\n","#!/usr/bin/env node\n\nimport { xyReact } from '../lib/index.ts'\n\nxyReact()\n .then(() => {\n process.exit(0)\n })\n .catch((error) => {\n console.error(error)\n process.exit(1)\n })\n"],"mappings":";;;;;AAEA,SAASA,iBAAiBC,kBAAkBC,mBAAmBC,gBAAgBC,sBAAsB;AACrG,OAAOC,WAAW;;;ACHlB,SAASC,gBAAgB;AAElB,IAAMC,UAAU,6BAAA;AACrB,SAAOC,SAAS,WAAW;IAAC;MAAC;MAAQ;QAAC;QAAuB;;;GAAyB;AACxF,GAFuB;;;ACDvB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,SAAOC,UAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;ACFrB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,UAAU,6BAAA;AACrB,SAAOC,UAAS,WAAW;IAAC;MAAC;MAAkB;;GAAwB;AACzE,GAFuB;;;ACFvB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,SAAOC,UAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;AJId,IAAMC,UAAU,mCAAA;AACrB,SAAO,MAAMC,gBAAgBC,kBAAkBC,eAAeD,kBAAkBE,iBAAiBC,eAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAC9FC,QACC,WACA,6BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,WAAA;AAC9BC,YAAQC,WAAWC,QAAAA;EACrB,CAAA,EAEDR,QACC,SACA,+BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWE,MAAAA;EACrB,CAAA,EAEDT,QACC,WACA,8CACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,oBAAA;AAC9BC,YAAQC,WAAWG,QAAAA;EACrB,CAAA,EAEDV,QACC,SACA,oCACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWI,MAAAA;EACrB,CAAA,EAEDC,cAAc,CAAA,EACdZ,QAAQ,KAAK,IAAI,MAAA;AAChBI,YAAQS,MAAMC,MAAMC,OAAO,sBAAsBD,MAAME,QAAQV,QAAQJ,KAAK,CAAA,CAAE,CAAA,GAAI,CAAA;AAClFE,YAAQC,IAAIS,MAAMG,KAAK,2CAAA,CAAA;EACzB,CAAA,EACCC,KAAI,EAAGhB;AACZ,GApDuB;;;AKHvBiB,QAAAA,EACGC,KAAK,MAAA;AACJC,UAAQC,KAAK,CAAA;AACf,CAAA,EACCC,MAAM,CAACC,UAAAA;AACNC,UAAQD,MAAMA,KAAAA;AACdH,UAAQC,KAAK,CAAA;AACf,CAAA;","names":["xyBuildCommands","xyCommonCommands","xyInstallCommands","xyLintCommands","xyParseOptions","chalk","runSteps","analyze","runSteps","runSteps","eject","runSteps","runSteps","sitemap","runSteps","runSteps","start","runSteps","xyReact","xyBuildCommands","xyInstallCommands","xyLintCommands","xyCommonCommands","xyParseOptions","command","yargs","argv","verbose","console","log","process","exitCode","analyze","eject","sitemap","start","demandCommand","error","chalk","yellow","magenta","gray","help","xyReact","then","process","exit","catch","error","console"]}
|
package/dist/bin/yarn3only.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/yarn3only.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { runXyWithWarning } from '@xylabs/ts-scripts-yarn3'\n\nrunXyWithWarning('yarn3only')\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/bin/yarn3only.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { runXyWithWarning } from '@xylabs/ts-scripts-yarn3'\n\nrunXyWithWarning('yarn3only')\n"],"mappings":";;;;AAEA,8BAAiC;IAEjCA,0CAAiB,WAAA;","names":["runXyWithWarning"]}
|
package/dist/bin/yarn3only.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/yarn3only.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { runXyWithWarning } from '@xylabs/ts-scripts-yarn3'\n\nrunXyWithWarning('yarn3only')\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/bin/yarn3only.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { runXyWithWarning } from '@xylabs/ts-scripts-yarn3'\n\nrunXyWithWarning('yarn3only')\n"],"mappings":";;;AAEA,SAASA,wBAAwB;AAEjCA,iBAAiB,WAAA;","names":["runXyWithWarning"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
6
13
|
var __copyProps = (to, from, except, desc) => {
|
|
7
14
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
15
|
for (let key of __getOwnPropNames(from))
|
|
@@ -11,15 +18,122 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
18
|
}
|
|
12
19
|
return to;
|
|
13
20
|
};
|
|
14
|
-
var
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
15
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/index.ts
|
|
16
32
|
var src_exports = {};
|
|
33
|
+
__export(src_exports, {
|
|
34
|
+
analyze: () => analyze,
|
|
35
|
+
eject: () => eject,
|
|
36
|
+
sitemap: () => sitemap,
|
|
37
|
+
start: () => start,
|
|
38
|
+
test: () => test,
|
|
39
|
+
xyReact: () => xyReact
|
|
40
|
+
});
|
|
17
41
|
module.exports = __toCommonJS(src_exports);
|
|
18
|
-
|
|
19
|
-
|
|
42
|
+
|
|
43
|
+
// src/actions/analyze.ts
|
|
44
|
+
var import_ts_scripts_yarn3 = require("@xylabs/ts-scripts-yarn3");
|
|
45
|
+
var analyze = /* @__PURE__ */ __name(() => {
|
|
46
|
+
return (0, import_ts_scripts_yarn3.runSteps)("Analyze", [
|
|
47
|
+
[
|
|
48
|
+
"yarn",
|
|
49
|
+
[
|
|
50
|
+
"source-map-explorer",
|
|
51
|
+
"build/static/js/*.ts"
|
|
52
|
+
]
|
|
53
|
+
]
|
|
54
|
+
]);
|
|
55
|
+
}, "analyze");
|
|
56
|
+
|
|
57
|
+
// src/actions/eject.ts
|
|
58
|
+
var import_ts_scripts_yarn32 = require("@xylabs/ts-scripts-yarn3");
|
|
59
|
+
var eject = /* @__PURE__ */ __name(() => {
|
|
60
|
+
return (0, import_ts_scripts_yarn32.runSteps)("Eject", [
|
|
61
|
+
[
|
|
62
|
+
"yarn",
|
|
63
|
+
"react-scripts eject"
|
|
64
|
+
]
|
|
65
|
+
]);
|
|
66
|
+
}, "eject");
|
|
67
|
+
|
|
68
|
+
// src/actions/sitemap.ts
|
|
69
|
+
var import_ts_scripts_yarn33 = require("@xylabs/ts-scripts-yarn3");
|
|
70
|
+
var sitemap = /* @__PURE__ */ __name(() => {
|
|
71
|
+
return (0, import_ts_scripts_yarn33.runSteps)("Sitemap", [
|
|
72
|
+
[
|
|
73
|
+
"ts-node-script",
|
|
74
|
+
"./scripts/sitemap.ts"
|
|
75
|
+
]
|
|
76
|
+
]);
|
|
77
|
+
}, "sitemap");
|
|
78
|
+
|
|
79
|
+
// src/actions/start.ts
|
|
80
|
+
var import_ts_scripts_yarn34 = require("@xylabs/ts-scripts-yarn3");
|
|
81
|
+
var start = /* @__PURE__ */ __name(() => {
|
|
82
|
+
return (0, import_ts_scripts_yarn34.runSteps)("Start", [
|
|
83
|
+
[
|
|
84
|
+
"yarn",
|
|
85
|
+
"react-scripts start"
|
|
86
|
+
]
|
|
87
|
+
]);
|
|
88
|
+
}, "start");
|
|
89
|
+
|
|
90
|
+
// src/actions/test.ts
|
|
91
|
+
var import_ts_scripts_yarn35 = require("@xylabs/ts-scripts-yarn3");
|
|
92
|
+
var test = /* @__PURE__ */ __name(() => {
|
|
93
|
+
return (0, import_ts_scripts_yarn35.runSteps)("Test", [
|
|
94
|
+
[
|
|
95
|
+
"yarn",
|
|
96
|
+
"react-scripts test"
|
|
97
|
+
]
|
|
98
|
+
]);
|
|
99
|
+
}, "test");
|
|
100
|
+
|
|
101
|
+
// src/lib/xyReact.ts
|
|
102
|
+
var import_ts_scripts_yarn36 = require("@xylabs/ts-scripts-yarn3");
|
|
103
|
+
var import_chalk = __toESM(require("chalk"), 1);
|
|
104
|
+
var xyReact = /* @__PURE__ */ __name(async () => {
|
|
105
|
+
return await (0, import_ts_scripts_yarn36.xyBuildCommands)((0, import_ts_scripts_yarn36.xyInstallCommands)((0, import_ts_scripts_yarn36.xyLintCommands)((0, import_ts_scripts_yarn36.xyInstallCommands)((0, import_ts_scripts_yarn36.xyCommonCommands)((0, import_ts_scripts_yarn36.xyParseOptions)()))))).command("analyze", "Analyze - Analyze Bundles", (yargs) => {
|
|
106
|
+
return yargs;
|
|
107
|
+
}, (argv) => {
|
|
108
|
+
if (argv.verbose) console.log("Analyzing");
|
|
109
|
+
process.exitCode = analyze();
|
|
110
|
+
}).command("eject", "Eject - Eject React project", (yargs) => {
|
|
111
|
+
return yargs;
|
|
112
|
+
}, (argv) => {
|
|
113
|
+
if (argv.verbose) console.log("Ejecting");
|
|
114
|
+
process.exitCode = eject();
|
|
115
|
+
}).command("sitemap", "Sitemap - Generate sitemap for the project", (yargs) => {
|
|
116
|
+
return yargs;
|
|
117
|
+
}, (argv) => {
|
|
118
|
+
if (argv.verbose) console.log("Generating Sitemap");
|
|
119
|
+
process.exitCode = sitemap();
|
|
120
|
+
}).command("start", "Start - Start project in browser", (yargs) => {
|
|
121
|
+
return yargs;
|
|
122
|
+
}, (argv) => {
|
|
123
|
+
if (argv.verbose) console.log("Starting");
|
|
124
|
+
process.exitCode = start();
|
|
125
|
+
}).demandCommand(1).command("*", "", () => {
|
|
126
|
+
console.error(import_chalk.default.yellow(`Command not found [${import_chalk.default.magenta(process.argv[2])}]`));
|
|
127
|
+
console.log(import_chalk.default.gray("Try 'yarn xy --help' for list of commands"));
|
|
128
|
+
}).help().argv;
|
|
129
|
+
}, "xyReact");
|
|
20
130
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
131
|
0 && (module.exports = {
|
|
22
|
-
|
|
23
|
-
|
|
132
|
+
analyze,
|
|
133
|
+
eject,
|
|
134
|
+
sitemap,
|
|
135
|
+
start,
|
|
136
|
+
test,
|
|
137
|
+
xyReact
|
|
24
138
|
});
|
|
25
139
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './actions/index.ts'\nexport * from './lib/index.ts'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/actions/analyze.ts","../src/actions/eject.ts","../src/actions/sitemap.ts","../src/actions/start.ts","../src/actions/test.ts","../src/lib/xyReact.ts"],"sourcesContent":["export * from './actions/index.ts'\nexport * from './lib/index.ts'\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const analyze = () => {\n return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.ts']]])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const eject = () => {\n return runSteps('Eject', [['yarn', 'react-scripts eject']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const sitemap = () => {\n return runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const start = () => {\n return runSteps('Start', [['yarn', 'react-scripts start']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const test = () => {\n return runSteps('Test', [['yarn', 'react-scripts test']])\n}\n","#!/usr/bin/env node\n\nimport { xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from '@xylabs/ts-scripts-yarn3'\nimport chalk from 'chalk'\n\nimport { analyze, eject, sitemap, start } from '../actions/index.ts'\n\nexport const xyReact = async () => {\n return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions())))))\n .command(\n 'analyze',\n 'Analyze - Analyze Bundles',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Analyzing')\n process.exitCode = analyze()\n },\n )\n .command(\n 'eject',\n 'Eject - Eject React project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Ejecting')\n process.exitCode = eject()\n },\n )\n .command(\n 'sitemap',\n 'Sitemap - Generate sitemap for the project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Generating Sitemap')\n process.exitCode = sitemap()\n },\n )\n .command(\n 'start',\n 'Start - Start project in browser',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Starting')\n process.exitCode = start()\n },\n )\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .help().argv\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;ACAA,8BAAyB;AAElB,IAAMA,UAAU,6BAAA;AACrB,aAAOC,kCAAS,WAAW;IAAC;MAAC;MAAQ;QAAC;QAAuB;;;GAAyB;AACxF,GAFuB;;;ACDvB,IAAAC,2BAAyB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,aAAOC,mCAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;ACFrB,IAAAC,2BAAyB;AAElB,IAAMC,UAAU,6BAAA;AACrB,aAAOC,mCAAS,WAAW;IAAC;MAAC;MAAkB;;GAAwB;AACzE,GAFuB;;;ACFvB,IAAAC,2BAAyB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,aAAOC,mCAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;ACFrB,IAAAC,2BAAyB;AAElB,IAAMC,OAAO,6BAAA;AAClB,aAAOC,mCAAS,QAAQ;IAAC;MAAC;MAAQ;;GAAsB;AAC1D,GAFoB;;;ACDpB,IAAAC,2BAAqG;AACrG,mBAAkB;AAIX,IAAMC,UAAU,mCAAA;AACrB,SAAO,UAAMC,8CAAgBC,gDAAkBC,6CAAeD,gDAAkBE,+CAAiBC,yCAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAC9FC,QACC,WACA,6BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,WAAA;AAC9BC,YAAQC,WAAWC,QAAAA;EACrB,CAAA,EAEDR,QACC,SACA,+BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWE,MAAAA;EACrB,CAAA,EAEDT,QACC,WACA,8CACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,oBAAA;AAC9BC,YAAQC,WAAWG,QAAAA;EACrB,CAAA,EAEDV,QACC,SACA,oCACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWI,MAAAA;EACrB,CAAA,EAEDC,cAAc,CAAA,EACdZ,QAAQ,KAAK,IAAI,MAAA;AAChBI,YAAQS,MAAMC,aAAAA,QAAMC,OAAO,sBAAsBD,aAAAA,QAAME,QAAQV,QAAQJ,KAAK,CAAA,CAAE,CAAA,GAAI,CAAA;AAClFE,YAAQC,IAAIS,aAAAA,QAAMG,KAAK,2CAAA,CAAA;EACzB,CAAA,EACCC,KAAI,EAAGhB;AACZ,GApDuB;","names":["analyze","runSteps","import_ts_scripts_yarn3","eject","runSteps","import_ts_scripts_yarn3","sitemap","runSteps","import_ts_scripts_yarn3","start","runSteps","import_ts_scripts_yarn3","test","runSteps","import_ts_scripts_yarn3","xyReact","xyBuildCommands","xyInstallCommands","xyLintCommands","xyCommonCommands","xyParseOptions","command","yargs","argv","verbose","console","log","process","exitCode","analyze","eject","sitemap","start","demandCommand","error","chalk","yellow","magenta","gray","help"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/actions/analyze.ts
|
|
5
|
+
import { runSteps } from "@xylabs/ts-scripts-yarn3";
|
|
6
|
+
var analyze = /* @__PURE__ */ __name(() => {
|
|
7
|
+
return runSteps("Analyze", [
|
|
8
|
+
[
|
|
9
|
+
"yarn",
|
|
10
|
+
[
|
|
11
|
+
"source-map-explorer",
|
|
12
|
+
"build/static/js/*.ts"
|
|
13
|
+
]
|
|
14
|
+
]
|
|
15
|
+
]);
|
|
16
|
+
}, "analyze");
|
|
17
|
+
|
|
18
|
+
// src/actions/eject.ts
|
|
19
|
+
import { runSteps as runSteps2 } from "@xylabs/ts-scripts-yarn3";
|
|
20
|
+
var eject = /* @__PURE__ */ __name(() => {
|
|
21
|
+
return runSteps2("Eject", [
|
|
22
|
+
[
|
|
23
|
+
"yarn",
|
|
24
|
+
"react-scripts eject"
|
|
25
|
+
]
|
|
26
|
+
]);
|
|
27
|
+
}, "eject");
|
|
28
|
+
|
|
29
|
+
// src/actions/sitemap.ts
|
|
30
|
+
import { runSteps as runSteps3 } from "@xylabs/ts-scripts-yarn3";
|
|
31
|
+
var sitemap = /* @__PURE__ */ __name(() => {
|
|
32
|
+
return runSteps3("Sitemap", [
|
|
33
|
+
[
|
|
34
|
+
"ts-node-script",
|
|
35
|
+
"./scripts/sitemap.ts"
|
|
36
|
+
]
|
|
37
|
+
]);
|
|
38
|
+
}, "sitemap");
|
|
39
|
+
|
|
40
|
+
// src/actions/start.ts
|
|
41
|
+
import { runSteps as runSteps4 } from "@xylabs/ts-scripts-yarn3";
|
|
42
|
+
var start = /* @__PURE__ */ __name(() => {
|
|
43
|
+
return runSteps4("Start", [
|
|
44
|
+
[
|
|
45
|
+
"yarn",
|
|
46
|
+
"react-scripts start"
|
|
47
|
+
]
|
|
48
|
+
]);
|
|
49
|
+
}, "start");
|
|
50
|
+
|
|
51
|
+
// src/actions/test.ts
|
|
52
|
+
import { runSteps as runSteps5 } from "@xylabs/ts-scripts-yarn3";
|
|
53
|
+
var test = /* @__PURE__ */ __name(() => {
|
|
54
|
+
return runSteps5("Test", [
|
|
55
|
+
[
|
|
56
|
+
"yarn",
|
|
57
|
+
"react-scripts test"
|
|
58
|
+
]
|
|
59
|
+
]);
|
|
60
|
+
}, "test");
|
|
61
|
+
|
|
62
|
+
// src/lib/xyReact.ts
|
|
63
|
+
import { xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from "@xylabs/ts-scripts-yarn3";
|
|
64
|
+
import chalk from "chalk";
|
|
65
|
+
var xyReact = /* @__PURE__ */ __name(async () => {
|
|
66
|
+
return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions()))))).command("analyze", "Analyze - Analyze Bundles", (yargs) => {
|
|
67
|
+
return yargs;
|
|
68
|
+
}, (argv) => {
|
|
69
|
+
if (argv.verbose) console.log("Analyzing");
|
|
70
|
+
process.exitCode = analyze();
|
|
71
|
+
}).command("eject", "Eject - Eject React project", (yargs) => {
|
|
72
|
+
return yargs;
|
|
73
|
+
}, (argv) => {
|
|
74
|
+
if (argv.verbose) console.log("Ejecting");
|
|
75
|
+
process.exitCode = eject();
|
|
76
|
+
}).command("sitemap", "Sitemap - Generate sitemap for the project", (yargs) => {
|
|
77
|
+
return yargs;
|
|
78
|
+
}, (argv) => {
|
|
79
|
+
if (argv.verbose) console.log("Generating Sitemap");
|
|
80
|
+
process.exitCode = sitemap();
|
|
81
|
+
}).command("start", "Start - Start project in browser", (yargs) => {
|
|
82
|
+
return yargs;
|
|
83
|
+
}, (argv) => {
|
|
84
|
+
if (argv.verbose) console.log("Starting");
|
|
85
|
+
process.exitCode = start();
|
|
86
|
+
}).demandCommand(1).command("*", "", () => {
|
|
87
|
+
console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`));
|
|
88
|
+
console.log(chalk.gray("Try 'yarn xy --help' for list of commands"));
|
|
89
|
+
}).help().argv;
|
|
90
|
+
}, "xyReact");
|
|
91
|
+
export {
|
|
92
|
+
analyze,
|
|
93
|
+
eject,
|
|
94
|
+
sitemap,
|
|
95
|
+
start,
|
|
96
|
+
test,
|
|
97
|
+
xyReact
|
|
98
|
+
};
|
|
3
99
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/
|
|
1
|
+
{"version":3,"sources":["../src/actions/analyze.ts","../src/actions/eject.ts","../src/actions/sitemap.ts","../src/actions/start.ts","../src/actions/test.ts","../src/lib/xyReact.ts"],"sourcesContent":["import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const analyze = () => {\n return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.ts']]])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const eject = () => {\n return runSteps('Eject', [['yarn', 'react-scripts eject']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const sitemap = () => {\n return runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const start = () => {\n return runSteps('Start', [['yarn', 'react-scripts start']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const test = () => {\n return runSteps('Test', [['yarn', 'react-scripts test']])\n}\n","#!/usr/bin/env node\n\nimport { xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from '@xylabs/ts-scripts-yarn3'\nimport chalk from 'chalk'\n\nimport { analyze, eject, sitemap, start } from '../actions/index.ts'\n\nexport const xyReact = async () => {\n return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions())))))\n .command(\n 'analyze',\n 'Analyze - Analyze Bundles',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Analyzing')\n process.exitCode = analyze()\n },\n )\n .command(\n 'eject',\n 'Eject - Eject React project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Ejecting')\n process.exitCode = eject()\n },\n )\n .command(\n 'sitemap',\n 'Sitemap - Generate sitemap for the project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Generating Sitemap')\n process.exitCode = sitemap()\n },\n )\n .command(\n 'start',\n 'Start - Start project in browser',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Starting')\n process.exitCode = start()\n },\n )\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .help().argv\n}\n"],"mappings":";;;;AAAA,SAASA,gBAAgB;AAElB,IAAMC,UAAU,6BAAA;AACrB,SAAOC,SAAS,WAAW;IAAC;MAAC;MAAQ;QAAC;QAAuB;;;GAAyB;AACxF,GAFuB;;;ACDvB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,SAAOC,UAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;ACFrB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,UAAU,6BAAA;AACrB,SAAOC,UAAS,WAAW;IAAC;MAAC;MAAkB;;GAAwB;AACzE,GAFuB;;;ACFvB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,SAAOC,UAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;ACFrB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,OAAO,6BAAA;AAClB,SAAOC,UAAS,QAAQ;IAAC;MAAC;MAAQ;;GAAsB;AAC1D,GAFoB;;;ACDpB,SAASC,iBAAiBC,kBAAkBC,mBAAmBC,gBAAgBC,sBAAsB;AACrG,OAAOC,WAAW;AAIX,IAAMC,UAAU,mCAAA;AACrB,SAAO,MAAMC,gBAAgBC,kBAAkBC,eAAeD,kBAAkBE,iBAAiBC,eAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAC9FC,QACC,WACA,6BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,WAAA;AAC9BC,YAAQC,WAAWC,QAAAA;EACrB,CAAA,EAEDR,QACC,SACA,+BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWE,MAAAA;EACrB,CAAA,EAEDT,QACC,WACA,8CACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,oBAAA;AAC9BC,YAAQC,WAAWG,QAAAA;EACrB,CAAA,EAEDV,QACC,SACA,oCACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWI,MAAAA;EACrB,CAAA,EAEDC,cAAc,CAAA,EACdZ,QAAQ,KAAK,IAAI,MAAA;AAChBI,YAAQS,MAAMC,MAAMC,OAAO,sBAAsBD,MAAME,QAAQV,QAAQJ,KAAK,CAAA,CAAE,CAAA,GAAI,CAAA;AAClFE,YAAQC,IAAIS,MAAMG,KAAK,2CAAA,CAAA;EACzB,CAAA,EACCC,KAAI,EAAGhB;AACZ,GApDuB;","names":["runSteps","analyze","runSteps","runSteps","eject","runSteps","runSteps","sitemap","runSteps","runSteps","start","runSteps","runSteps","test","runSteps","xyBuildCommands","xyCommonCommands","xyInstallCommands","xyLintCommands","xyParseOptions","chalk","xyReact","xyBuildCommands","xyInstallCommands","xyLintCommands","xyCommonCommands","xyParseOptions","command","yargs","argv","verbose","console","log","process","exitCode","analyze","eject","sitemap","start","demandCommand","error","chalk","yellow","magenta","gray","help"]}
|
package/dist/lib/index.cjs
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
6
13
|
var __copyProps = (to, from, except, desc) => {
|
|
7
14
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
15
|
for (let key of __getOwnPropNames(from))
|
|
@@ -11,13 +18,103 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
18
|
}
|
|
12
19
|
return to;
|
|
13
20
|
};
|
|
14
|
-
var
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
15
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/lib/index.ts
|
|
16
32
|
var lib_exports = {};
|
|
33
|
+
__export(lib_exports, {
|
|
34
|
+
xyReact: () => xyReact
|
|
35
|
+
});
|
|
17
36
|
module.exports = __toCommonJS(lib_exports);
|
|
18
|
-
|
|
37
|
+
|
|
38
|
+
// src/lib/xyReact.ts
|
|
39
|
+
var import_ts_scripts_yarn35 = require("@xylabs/ts-scripts-yarn3");
|
|
40
|
+
var import_chalk = __toESM(require("chalk"), 1);
|
|
41
|
+
|
|
42
|
+
// src/actions/analyze.ts
|
|
43
|
+
var import_ts_scripts_yarn3 = require("@xylabs/ts-scripts-yarn3");
|
|
44
|
+
var analyze = /* @__PURE__ */ __name(() => {
|
|
45
|
+
return (0, import_ts_scripts_yarn3.runSteps)("Analyze", [
|
|
46
|
+
[
|
|
47
|
+
"yarn",
|
|
48
|
+
[
|
|
49
|
+
"source-map-explorer",
|
|
50
|
+
"build/static/js/*.ts"
|
|
51
|
+
]
|
|
52
|
+
]
|
|
53
|
+
]);
|
|
54
|
+
}, "analyze");
|
|
55
|
+
|
|
56
|
+
// src/actions/eject.ts
|
|
57
|
+
var import_ts_scripts_yarn32 = require("@xylabs/ts-scripts-yarn3");
|
|
58
|
+
var eject = /* @__PURE__ */ __name(() => {
|
|
59
|
+
return (0, import_ts_scripts_yarn32.runSteps)("Eject", [
|
|
60
|
+
[
|
|
61
|
+
"yarn",
|
|
62
|
+
"react-scripts eject"
|
|
63
|
+
]
|
|
64
|
+
]);
|
|
65
|
+
}, "eject");
|
|
66
|
+
|
|
67
|
+
// src/actions/sitemap.ts
|
|
68
|
+
var import_ts_scripts_yarn33 = require("@xylabs/ts-scripts-yarn3");
|
|
69
|
+
var sitemap = /* @__PURE__ */ __name(() => {
|
|
70
|
+
return (0, import_ts_scripts_yarn33.runSteps)("Sitemap", [
|
|
71
|
+
[
|
|
72
|
+
"ts-node-script",
|
|
73
|
+
"./scripts/sitemap.ts"
|
|
74
|
+
]
|
|
75
|
+
]);
|
|
76
|
+
}, "sitemap");
|
|
77
|
+
|
|
78
|
+
// src/actions/start.ts
|
|
79
|
+
var import_ts_scripts_yarn34 = require("@xylabs/ts-scripts-yarn3");
|
|
80
|
+
var start = /* @__PURE__ */ __name(() => {
|
|
81
|
+
return (0, import_ts_scripts_yarn34.runSteps)("Start", [
|
|
82
|
+
[
|
|
83
|
+
"yarn",
|
|
84
|
+
"react-scripts start"
|
|
85
|
+
]
|
|
86
|
+
]);
|
|
87
|
+
}, "start");
|
|
88
|
+
|
|
89
|
+
// src/lib/xyReact.ts
|
|
90
|
+
var xyReact = /* @__PURE__ */ __name(async () => {
|
|
91
|
+
return await (0, import_ts_scripts_yarn35.xyBuildCommands)((0, import_ts_scripts_yarn35.xyInstallCommands)((0, import_ts_scripts_yarn35.xyLintCommands)((0, import_ts_scripts_yarn35.xyInstallCommands)((0, import_ts_scripts_yarn35.xyCommonCommands)((0, import_ts_scripts_yarn35.xyParseOptions)()))))).command("analyze", "Analyze - Analyze Bundles", (yargs) => {
|
|
92
|
+
return yargs;
|
|
93
|
+
}, (argv) => {
|
|
94
|
+
if (argv.verbose) console.log("Analyzing");
|
|
95
|
+
process.exitCode = analyze();
|
|
96
|
+
}).command("eject", "Eject - Eject React project", (yargs) => {
|
|
97
|
+
return yargs;
|
|
98
|
+
}, (argv) => {
|
|
99
|
+
if (argv.verbose) console.log("Ejecting");
|
|
100
|
+
process.exitCode = eject();
|
|
101
|
+
}).command("sitemap", "Sitemap - Generate sitemap for the project", (yargs) => {
|
|
102
|
+
return yargs;
|
|
103
|
+
}, (argv) => {
|
|
104
|
+
if (argv.verbose) console.log("Generating Sitemap");
|
|
105
|
+
process.exitCode = sitemap();
|
|
106
|
+
}).command("start", "Start - Start project in browser", (yargs) => {
|
|
107
|
+
return yargs;
|
|
108
|
+
}, (argv) => {
|
|
109
|
+
if (argv.verbose) console.log("Starting");
|
|
110
|
+
process.exitCode = start();
|
|
111
|
+
}).demandCommand(1).command("*", "", () => {
|
|
112
|
+
console.error(import_chalk.default.yellow(`Command not found [${import_chalk.default.magenta(process.argv[2])}]`));
|
|
113
|
+
console.log(import_chalk.default.gray("Try 'yarn xy --help' for list of commands"));
|
|
114
|
+
}).help().argv;
|
|
115
|
+
}, "xyReact");
|
|
19
116
|
// Annotate the CommonJS export names for ESM import in node:
|
|
20
117
|
0 && (module.exports = {
|
|
21
|
-
|
|
118
|
+
xyReact
|
|
22
119
|
});
|
|
23
120
|
//# sourceMappingURL=index.cjs.map
|
package/dist/lib/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/index.ts"],"sourcesContent":["export * from './xyReact.ts'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/lib/index.ts","../../src/lib/xyReact.ts","../../src/actions/analyze.ts","../../src/actions/eject.ts","../../src/actions/sitemap.ts","../../src/actions/start.ts"],"sourcesContent":["export * from './xyReact.ts'\n","#!/usr/bin/env node\n\nimport { xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from '@xylabs/ts-scripts-yarn3'\nimport chalk from 'chalk'\n\nimport { analyze, eject, sitemap, start } from '../actions/index.ts'\n\nexport const xyReact = async () => {\n return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions())))))\n .command(\n 'analyze',\n 'Analyze - Analyze Bundles',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Analyzing')\n process.exitCode = analyze()\n },\n )\n .command(\n 'eject',\n 'Eject - Eject React project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Ejecting')\n process.exitCode = eject()\n },\n )\n .command(\n 'sitemap',\n 'Sitemap - Generate sitemap for the project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Generating Sitemap')\n process.exitCode = sitemap()\n },\n )\n .command(\n 'start',\n 'Start - Start project in browser',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Starting')\n process.exitCode = start()\n },\n )\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .help().argv\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const analyze = () => {\n return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.ts']]])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const eject = () => {\n return runSteps('Eject', [['yarn', 'react-scripts eject']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const sitemap = () => {\n return runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const start = () => {\n return runSteps('Start', [['yarn', 'react-scripts start']])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACEA,IAAAA,2BAAqG;AACrG,mBAAkB;;;ACHlB,8BAAyB;AAElB,IAAMC,UAAU,6BAAA;AACrB,aAAOC,kCAAS,WAAW;IAAC;MAAC;MAAQ;QAAC;QAAuB;;;GAAyB;AACxF,GAFuB;;;ACDvB,IAAAC,2BAAyB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,aAAOC,mCAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;ACFrB,IAAAC,2BAAyB;AAElB,IAAMC,UAAU,6BAAA;AACrB,aAAOC,mCAAS,WAAW;IAAC;MAAC;MAAkB;;GAAwB;AACzE,GAFuB;;;ACFvB,IAAAC,2BAAyB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,aAAOC,mCAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;AJId,IAAMC,UAAU,mCAAA;AACrB,SAAO,UAAMC,8CAAgBC,gDAAkBC,6CAAeD,gDAAkBE,+CAAiBC,yCAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAC9FC,QACC,WACA,6BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,WAAA;AAC9BC,YAAQC,WAAWC,QAAAA;EACrB,CAAA,EAEDR,QACC,SACA,+BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWE,MAAAA;EACrB,CAAA,EAEDT,QACC,WACA,8CACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,oBAAA;AAC9BC,YAAQC,WAAWG,QAAAA;EACrB,CAAA,EAEDV,QACC,SACA,oCACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWI,MAAAA;EACrB,CAAA,EAEDC,cAAc,CAAA,EACdZ,QAAQ,KAAK,IAAI,MAAA;AAChBI,YAAQS,MAAMC,aAAAA,QAAMC,OAAO,sBAAsBD,aAAAA,QAAME,QAAQV,QAAQJ,KAAK,CAAA,CAAE,CAAA,GAAI,CAAA;AAClFE,YAAQC,IAAIS,aAAAA,QAAMG,KAAK,2CAAA,CAAA;EACzB,CAAA,EACCC,KAAI,EAAGhB;AACZ,GApDuB;","names":["import_ts_scripts_yarn3","analyze","runSteps","import_ts_scripts_yarn3","eject","runSteps","import_ts_scripts_yarn3","sitemap","runSteps","import_ts_scripts_yarn3","start","runSteps","xyReact","xyBuildCommands","xyInstallCommands","xyLintCommands","xyCommonCommands","xyParseOptions","command","yargs","argv","verbose","console","log","process","exitCode","analyze","eject","sitemap","start","demandCommand","error","chalk","yellow","magenta","gray","help"]}
|
package/dist/lib/index.mjs
CHANGED
|
@@ -1,2 +1,85 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/lib/xyReact.ts
|
|
5
|
+
import { xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from "@xylabs/ts-scripts-yarn3";
|
|
6
|
+
import chalk from "chalk";
|
|
7
|
+
|
|
8
|
+
// src/actions/analyze.ts
|
|
9
|
+
import { runSteps } from "@xylabs/ts-scripts-yarn3";
|
|
10
|
+
var analyze = /* @__PURE__ */ __name(() => {
|
|
11
|
+
return runSteps("Analyze", [
|
|
12
|
+
[
|
|
13
|
+
"yarn",
|
|
14
|
+
[
|
|
15
|
+
"source-map-explorer",
|
|
16
|
+
"build/static/js/*.ts"
|
|
17
|
+
]
|
|
18
|
+
]
|
|
19
|
+
]);
|
|
20
|
+
}, "analyze");
|
|
21
|
+
|
|
22
|
+
// src/actions/eject.ts
|
|
23
|
+
import { runSteps as runSteps2 } from "@xylabs/ts-scripts-yarn3";
|
|
24
|
+
var eject = /* @__PURE__ */ __name(() => {
|
|
25
|
+
return runSteps2("Eject", [
|
|
26
|
+
[
|
|
27
|
+
"yarn",
|
|
28
|
+
"react-scripts eject"
|
|
29
|
+
]
|
|
30
|
+
]);
|
|
31
|
+
}, "eject");
|
|
32
|
+
|
|
33
|
+
// src/actions/sitemap.ts
|
|
34
|
+
import { runSteps as runSteps3 } from "@xylabs/ts-scripts-yarn3";
|
|
35
|
+
var sitemap = /* @__PURE__ */ __name(() => {
|
|
36
|
+
return runSteps3("Sitemap", [
|
|
37
|
+
[
|
|
38
|
+
"ts-node-script",
|
|
39
|
+
"./scripts/sitemap.ts"
|
|
40
|
+
]
|
|
41
|
+
]);
|
|
42
|
+
}, "sitemap");
|
|
43
|
+
|
|
44
|
+
// src/actions/start.ts
|
|
45
|
+
import { runSteps as runSteps4 } from "@xylabs/ts-scripts-yarn3";
|
|
46
|
+
var start = /* @__PURE__ */ __name(() => {
|
|
47
|
+
return runSteps4("Start", [
|
|
48
|
+
[
|
|
49
|
+
"yarn",
|
|
50
|
+
"react-scripts start"
|
|
51
|
+
]
|
|
52
|
+
]);
|
|
53
|
+
}, "start");
|
|
54
|
+
|
|
55
|
+
// src/lib/xyReact.ts
|
|
56
|
+
var xyReact = /* @__PURE__ */ __name(async () => {
|
|
57
|
+
return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions()))))).command("analyze", "Analyze - Analyze Bundles", (yargs) => {
|
|
58
|
+
return yargs;
|
|
59
|
+
}, (argv) => {
|
|
60
|
+
if (argv.verbose) console.log("Analyzing");
|
|
61
|
+
process.exitCode = analyze();
|
|
62
|
+
}).command("eject", "Eject - Eject React project", (yargs) => {
|
|
63
|
+
return yargs;
|
|
64
|
+
}, (argv) => {
|
|
65
|
+
if (argv.verbose) console.log("Ejecting");
|
|
66
|
+
process.exitCode = eject();
|
|
67
|
+
}).command("sitemap", "Sitemap - Generate sitemap for the project", (yargs) => {
|
|
68
|
+
return yargs;
|
|
69
|
+
}, (argv) => {
|
|
70
|
+
if (argv.verbose) console.log("Generating Sitemap");
|
|
71
|
+
process.exitCode = sitemap();
|
|
72
|
+
}).command("start", "Start - Start project in browser", (yargs) => {
|
|
73
|
+
return yargs;
|
|
74
|
+
}, (argv) => {
|
|
75
|
+
if (argv.verbose) console.log("Starting");
|
|
76
|
+
process.exitCode = start();
|
|
77
|
+
}).demandCommand(1).command("*", "", () => {
|
|
78
|
+
console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`));
|
|
79
|
+
console.log(chalk.gray("Try 'yarn xy --help' for list of commands"));
|
|
80
|
+
}).help().argv;
|
|
81
|
+
}, "xyReact");
|
|
82
|
+
export {
|
|
83
|
+
xyReact
|
|
84
|
+
};
|
|
2
85
|
//# sourceMappingURL=index.mjs.map
|
package/dist/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/
|
|
1
|
+
{"version":3,"sources":["../../src/lib/xyReact.ts","../../src/actions/analyze.ts","../../src/actions/eject.ts","../../src/actions/sitemap.ts","../../src/actions/start.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { xyBuildCommands, xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from '@xylabs/ts-scripts-yarn3'\nimport chalk from 'chalk'\n\nimport { analyze, eject, sitemap, start } from '../actions/index.ts'\n\nexport const xyReact = async () => {\n return await xyBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions())))))\n .command(\n 'analyze',\n 'Analyze - Analyze Bundles',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Analyzing')\n process.exitCode = analyze()\n },\n )\n .command(\n 'eject',\n 'Eject - Eject React project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Ejecting')\n process.exitCode = eject()\n },\n )\n .command(\n 'sitemap',\n 'Sitemap - Generate sitemap for the project',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Generating Sitemap')\n process.exitCode = sitemap()\n },\n )\n .command(\n 'start',\n 'Start - Start project in browser',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Starting')\n process.exitCode = start()\n },\n )\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .help().argv\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const analyze = () => {\n return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.ts']]])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const eject = () => {\n return runSteps('Eject', [['yarn', 'react-scripts eject']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const sitemap = () => {\n return runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']])\n}\n","#!/usr/bin/env node\nimport { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const start = () => {\n return runSteps('Start', [['yarn', 'react-scripts start']])\n}\n"],"mappings":";;;;AAEA,SAASA,iBAAiBC,kBAAkBC,mBAAmBC,gBAAgBC,sBAAsB;AACrG,OAAOC,WAAW;;;ACHlB,SAASC,gBAAgB;AAElB,IAAMC,UAAU,6BAAA;AACrB,SAAOC,SAAS,WAAW;IAAC;MAAC;MAAQ;QAAC;QAAuB;;;GAAyB;AACxF,GAFuB;;;ACDvB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,SAAOC,UAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;ACFrB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,UAAU,6BAAA;AACrB,SAAOC,UAAS,WAAW;IAAC;MAAC;MAAkB;;GAAwB;AACzE,GAFuB;;;ACFvB,SAASC,YAAAA,iBAAgB;AAElB,IAAMC,QAAQ,6BAAA;AACnB,SAAOC,UAAS,SAAS;IAAC;MAAC;MAAQ;;GAAuB;AAC5D,GAFqB;;;AJId,IAAMC,UAAU,mCAAA;AACrB,SAAO,MAAMC,gBAAgBC,kBAAkBC,eAAeD,kBAAkBE,iBAAiBC,eAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAC9FC,QACC,WACA,6BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,WAAA;AAC9BC,YAAQC,WAAWC,QAAAA;EACrB,CAAA,EAEDR,QACC,SACA,+BACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWE,MAAAA;EACrB,CAAA,EAEDT,QACC,WACA,8CACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,oBAAA;AAC9BC,YAAQC,WAAWG,QAAAA;EACrB,CAAA,EAEDV,QACC,SACA,oCACA,CAACC,UAAAA;AACC,WAAOA;EACT,GACA,CAACC,SAAAA;AACC,QAAIA,KAAKC,QAASC,SAAQC,IAAI,UAAA;AAC9BC,YAAQC,WAAWI,MAAAA;EACrB,CAAA,EAEDC,cAAc,CAAA,EACdZ,QAAQ,KAAK,IAAI,MAAA;AAChBI,YAAQS,MAAMC,MAAMC,OAAO,sBAAsBD,MAAME,QAAQV,QAAQJ,KAAK,CAAA,CAAE,CAAA,GAAI,CAAA;AAClFE,YAAQC,IAAIS,MAAMG,KAAK,2CAAA,CAAA;EACzB,CAAA,EACCC,KAAI,EAAGhB;AACZ,GApDuB;","names":["xyBuildCommands","xyCommonCommands","xyInstallCommands","xyLintCommands","xyParseOptions","chalk","runSteps","analyze","runSteps","runSteps","eject","runSteps","runSteps","sitemap","runSteps","runSteps","start","runSteps","xyReact","xyBuildCommands","xyInstallCommands","xyLintCommands","xyCommonCommands","xyParseOptions","command","yargs","argv","verbose","console","log","process","exitCode","analyze","eject","sitemap","start","demandCommand","error","chalk","yellow","magenta","gray","help"]}
|