@xylabs/ts-scripts-react-yarn3 3.0.0-rc.16 → 3.0.0-rc.2

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.d.mts CHANGED
@@ -1,3 +1,34 @@
1
- export * from './actions';
2
- export * from './lib';
3
- //# sourceMappingURL=index.d.ts.map
1
+ import yargs from 'yargs';
2
+
3
+ declare const analyze: () => number;
4
+
5
+ declare const build: () => number;
6
+
7
+ declare const buildci: () => number;
8
+
9
+ declare const eject: () => number;
10
+
11
+ declare const packageCompile: () => number;
12
+ declare const packageCompileAsync: () => Promise<number>;
13
+
14
+ declare const rebuild: () => number;
15
+
16
+ declare const sitemap: () => number;
17
+
18
+ declare const start: () => number;
19
+
20
+ declare const test: () => number;
21
+
22
+ declare const xyReact: () => {
23
+ [x: string]: unknown;
24
+ _: (string | number)[];
25
+ $0: string;
26
+ } | Promise<{
27
+ [x: string]: unknown;
28
+ _: (string | number)[];
29
+ $0: string;
30
+ }>;
31
+
32
+ declare const xyReactBuildCommands: (args: yargs.Argv) => yargs.Argv<{}>;
33
+
34
+ export { analyze, build, buildci, eject, packageCompile, packageCompileAsync, rebuild, sitemap, start, test, xyReact, xyReactBuildCommands };
package/dist/index.js CHANGED
@@ -1,157 +1,259 @@
1
- 'use strict';
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2
29
 
3
- var tsScriptsYarn3 = require('@xylabs/ts-scripts-yarn3');
4
- var chalk = require('chalk');
30
+ // src/index.ts
31
+ var src_exports = {};
32
+ __export(src_exports, {
33
+ analyze: () => analyze,
34
+ build: () => build,
35
+ buildci: () => buildci,
36
+ eject: () => eject,
37
+ packageCompile: () => packageCompile,
38
+ packageCompileAsync: () => packageCompileAsync,
39
+ rebuild: () => rebuild,
40
+ sitemap: () => sitemap,
41
+ start: () => start,
42
+ test: () => test,
43
+ xyReact: () => xyReact,
44
+ xyReactBuildCommands: () => xyReactBuildCommands
45
+ });
46
+ module.exports = __toCommonJS(src_exports);
5
47
 
6
- const analyze = () => {
7
- return tsScriptsYarn3.runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.js']]]);
48
+ // src/actions/analyze.ts
49
+ var import_ts_scripts_yarn3 = require("@xylabs/ts-scripts-yarn3");
50
+ var analyze = () => {
51
+ return (0, import_ts_scripts_yarn3.runSteps)("Analyze", [["yarn", ["source-map-explorer", "build/static/js/*.js"]]]);
8
52
  };
9
53
 
10
- const build = () => {
11
- return tsScriptsYarn3.runSteps('Build', [
12
- ['yarn', ['xy', 'compile']],
13
- ['yarn', 'xy lint'],
14
- ['yarn', 'xy deps'],
15
- ]);
54
+ // src/actions/build.ts
55
+ var import_ts_scripts_yarn32 = require("@xylabs/ts-scripts-yarn3");
56
+ var build = () => {
57
+ return (0, import_ts_scripts_yarn32.runSteps)("Build", [
58
+ ["yarn", ["xy", "compile"]],
59
+ ["yarn", "xy lint"],
60
+ ["yarn", "xy deps"]
61
+ ]);
16
62
  };
17
63
 
18
- const buildci = () => {
19
- return tsScriptsYarn3.runSteps('Build', [
20
- ['yarn', ['xy', 'compile']],
21
- ['yarn', 'react-scripts build'],
22
- ['yarn', 'xy lint'],
23
- ['yarn', 'xy deps'],
24
- ['ts-node-script', './scripts/sitemap.ts'],
25
- ]);
64
+ // src/actions/build-ci.ts
65
+ var import_ts_scripts_yarn33 = require("@xylabs/ts-scripts-yarn3");
66
+ var buildci = () => {
67
+ return (0, import_ts_scripts_yarn33.runSteps)("Build", [
68
+ ["yarn", ["xy", "compile"]],
69
+ ["yarn", "react-scripts build"],
70
+ ["yarn", "xy lint"],
71
+ ["yarn", "xy deps"],
72
+ ["ts-node-script", "./scripts/sitemap.ts"]
73
+ ]);
26
74
  };
27
75
 
28
- const eject = () => {
29
- return tsScriptsYarn3.runSteps('Eject', [['yarn', 'react-scripts eject']]);
76
+ // src/actions/eject.ts
77
+ var import_ts_scripts_yarn34 = require("@xylabs/ts-scripts-yarn3");
78
+ var eject = () => {
79
+ return (0, import_ts_scripts_yarn34.runSteps)("Eject", [["yarn", "react-scripts eject"]]);
30
80
  };
31
81
 
32
- const packageCompile = () => {
33
- return tsScriptsYarn3.runSteps('Package Compile', [
34
- ['yarn', ['react-scripts', 'build']],
35
- ['ts-node-script', './scripts/sitemap.ts'],
36
- ]);
82
+ // src/actions/package/compile.ts
83
+ var import_ts_scripts_yarn35 = require("@xylabs/ts-scripts-yarn3");
84
+ var packageCompile = () => {
85
+ return (0, import_ts_scripts_yarn35.runSteps)("Package Compile", [
86
+ ["yarn", ["react-scripts", "build"]],
87
+ ["ts-node-script", "./scripts/sitemap.ts"]
88
+ ]);
37
89
  };
38
- const packageCompileAsync = () => {
39
- return tsScriptsYarn3.runStepsAsync('Package Compile', [
40
- ['yarn', ['react-scripts', 'build']],
41
- ['ts-node-script', './scripts/sitemap.ts'],
42
- ]);
90
+ var packageCompileAsync = () => {
91
+ return (0, import_ts_scripts_yarn35.runStepsAsync)("Package Compile", [
92
+ ["yarn", ["react-scripts", "build"]],
93
+ ["ts-node-script", "./scripts/sitemap.ts"]
94
+ ]);
43
95
  };
44
96
 
45
- const rebuild = () => {
46
- return tsScriptsYarn3.runSteps('Rebuild', [
47
- ['yarn', 'xy clean'],
48
- ['yarn', 'xy build'],
49
- ]);
97
+ // src/actions/rebuild.ts
98
+ var import_ts_scripts_yarn36 = require("@xylabs/ts-scripts-yarn3");
99
+ var rebuild = () => {
100
+ return (0, import_ts_scripts_yarn36.runSteps)("Rebuild", [
101
+ ["yarn", "xy clean"],
102
+ ["yarn", "xy build"]
103
+ ]);
50
104
  };
51
105
 
52
- const sitemap = () => {
53
- return tsScriptsYarn3.runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']]);
106
+ // src/actions/sitemap.ts
107
+ var import_ts_scripts_yarn37 = require("@xylabs/ts-scripts-yarn3");
108
+ var sitemap = () => {
109
+ return (0, import_ts_scripts_yarn37.runSteps)("Sitemap", [["ts-node-script", "./scripts/sitemap.ts"]]);
54
110
  };
55
111
 
56
- const start = () => {
57
- return tsScriptsYarn3.runSteps('Start', [['yarn', 'react-scripts start']]);
112
+ // src/actions/start.ts
113
+ var import_ts_scripts_yarn38 = require("@xylabs/ts-scripts-yarn3");
114
+ var start = () => {
115
+ return (0, import_ts_scripts_yarn38.runSteps)("Start", [["yarn", "react-scripts start"]]);
58
116
  };
59
117
 
60
- const test = () => {
61
- return tsScriptsYarn3.runSteps('Test', [['yarn', 'react-scripts test']]);
118
+ // src/actions/test.ts
119
+ var import_ts_scripts_yarn39 = require("@xylabs/ts-scripts-yarn3");
120
+ var test = () => {
121
+ return (0, import_ts_scripts_yarn39.runSteps)("Test", [["yarn", "react-scripts test"]]);
62
122
  };
63
123
 
64
- const xyReactBuildCommands = (args) => {
65
- return args
66
- .command('build', 'Build - Build React project && Packages', (yargs) => {
67
- return yargs;
68
- }, (argv) => {
69
- if (argv.verbose)
70
- console.log('Building');
71
- process.exitCode = build();
72
- })
73
- .command('build-ci', 'Build CI - Build React project for continuous integration', (yargs) => {
74
- return yargs;
75
- }, (argv) => {
76
- if (argv.verbose)
77
- console.log('Building CI');
78
- process.exitCode = buildci();
79
- })
80
- .command('compile [package]', 'Compile with Typescript & Copy Images', (yargs) => {
81
- return yargs.positional('package', {
82
- describe: 'Specific package to compile',
83
- });
84
- }, async (argv) => {
85
- if (argv.verbose)
86
- console.log(`Compiling: ${argv.package ?? 'all'}`);
87
- process.exitCode = await tsScriptsYarn3.compile({ target: argv.target });
88
- })
89
- .command('copy-assets [package]', 'Copy Assets - Copy the assets from src to dist', (yargs) => {
90
- return yargs.positional('package', {
91
- describe: 'Specific package to copy assets',
92
- });
93
- }, async (argv) => {
94
- if (argv.verbose)
95
- console.log(`Copying Assets: ${argv.package ?? 'all'}`);
96
- process.exitCode = await tsScriptsYarn3.copyAssets({ target: argv.target });
97
- })
98
- .command('rebuild', 'Rebuild - Clean, Compile & Lint', (yargs) => {
99
- return yargs;
100
- }, (argv) => {
101
- if (argv.verbose)
102
- console.log('Rebuilding');
103
- process.exitCode = rebuild();
104
- });
105
- };
124
+ // src/lib/xyReact.ts
125
+ var import_ts_scripts_yarn311 = require("@xylabs/ts-scripts-yarn3");
126
+ var import_chalk = __toESM(require("chalk"));
106
127
 
107
- const xyReact = () => {
108
- return xyReactBuildCommands(tsScriptsYarn3.xyInstallCommands(tsScriptsYarn3.xyLintCommands(tsScriptsYarn3.xyInstallCommands(tsScriptsYarn3.xyCommonCommands(tsScriptsYarn3.xyParseOptions())))))
109
- .command('analyze', 'Analyze - Analyze Bundles', (yargs) => {
110
- return yargs;
111
- }, (argv) => {
112
- if (argv.verbose)
113
- console.log('Analyzing');
114
- process.exitCode = analyze();
115
- })
116
- .command('eject', 'Eject - Eject React project', (yargs) => {
117
- return yargs;
118
- }, (argv) => {
119
- if (argv.verbose)
120
- console.log('Ejecting');
121
- process.exitCode = eject();
122
- })
123
- .command('sitemap', 'Sitemap - Generate sitemap for the project', (yargs) => {
124
- return yargs;
125
- }, (argv) => {
126
- if (argv.verbose)
127
- console.log('Generating Sitemap');
128
- process.exitCode = sitemap();
129
- })
130
- .command('start', 'Start - Start project in browser', (yargs) => {
131
- return yargs;
132
- }, (argv) => {
133
- if (argv.verbose)
134
- console.log('Starting');
135
- process.exitCode = start();
136
- })
137
- .demandCommand(1)
138
- .command('*', '', () => {
139
- console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`));
140
- console.log(chalk.gray("Try 'yarn xy --help' for list of commands"));
141
- })
142
- .help().argv;
128
+ // src/lib/xyReactBuildCommands.ts
129
+ var import_ts_scripts_yarn310 = require("@xylabs/ts-scripts-yarn3");
130
+ var xyReactBuildCommands = (args) => {
131
+ return args.command(
132
+ "build",
133
+ "Build - Build React project && Packages",
134
+ (yargs) => {
135
+ return yargs;
136
+ },
137
+ (argv) => {
138
+ if (argv.verbose)
139
+ console.log("Building");
140
+ process.exitCode = build();
141
+ }
142
+ ).command(
143
+ "build-ci",
144
+ "Build CI - Build React project for continuous integration",
145
+ (yargs) => {
146
+ return yargs;
147
+ },
148
+ (argv) => {
149
+ if (argv.verbose)
150
+ console.log("Building CI");
151
+ process.exitCode = buildci();
152
+ }
153
+ ).command(
154
+ "compile [package]",
155
+ "Compile with Typescript & Copy Images",
156
+ (yargs) => {
157
+ return yargs.positional("package", {
158
+ describe: "Specific package to compile"
159
+ });
160
+ },
161
+ async (argv) => {
162
+ if (argv.verbose)
163
+ console.log(`Compiling: ${argv.package ?? "all"}`);
164
+ process.exitCode = await (0, import_ts_scripts_yarn310.compile)({ target: argv.target });
165
+ }
166
+ ).command(
167
+ "copy-assets [package]",
168
+ "Copy Assets - Copy the assets from src to dist",
169
+ (yargs) => {
170
+ return yargs.positional("package", {
171
+ describe: "Specific package to copy assets"
172
+ });
173
+ },
174
+ async (argv) => {
175
+ if (argv.verbose)
176
+ console.log(`Copying Assets: ${argv.package ?? "all"}`);
177
+ process.exitCode = await (0, import_ts_scripts_yarn310.copyAssets)({ target: argv.target });
178
+ }
179
+ ).command(
180
+ "rebuild",
181
+ "Rebuild - Clean, Compile & Lint",
182
+ (yargs) => {
183
+ return yargs;
184
+ },
185
+ (argv) => {
186
+ if (argv.verbose)
187
+ console.log("Rebuilding");
188
+ process.exitCode = rebuild();
189
+ }
190
+ );
143
191
  };
144
192
 
145
- exports.analyze = analyze;
146
- exports.build = build;
147
- exports.buildci = buildci;
148
- exports.eject = eject;
149
- exports.packageCompile = packageCompile;
150
- exports.packageCompileAsync = packageCompileAsync;
151
- exports.rebuild = rebuild;
152
- exports.sitemap = sitemap;
153
- exports.start = start;
154
- exports.test = test;
155
- exports.xyReact = xyReact;
156
- exports.xyReactBuildCommands = xyReactBuildCommands;
157
- //# sourceMappingURL=index.js.map
193
+ // src/lib/xyReact.ts
194
+ var xyReact = () => {
195
+ return xyReactBuildCommands((0, import_ts_scripts_yarn311.xyInstallCommands)((0, import_ts_scripts_yarn311.xyLintCommands)((0, import_ts_scripts_yarn311.xyInstallCommands)((0, import_ts_scripts_yarn311.xyCommonCommands)((0, import_ts_scripts_yarn311.xyParseOptions)()))))).command(
196
+ "analyze",
197
+ "Analyze - Analyze Bundles",
198
+ (yargs) => {
199
+ return yargs;
200
+ },
201
+ (argv) => {
202
+ if (argv.verbose)
203
+ console.log("Analyzing");
204
+ process.exitCode = analyze();
205
+ }
206
+ ).command(
207
+ "eject",
208
+ "Eject - Eject React project",
209
+ (yargs) => {
210
+ return yargs;
211
+ },
212
+ (argv) => {
213
+ if (argv.verbose)
214
+ console.log("Ejecting");
215
+ process.exitCode = eject();
216
+ }
217
+ ).command(
218
+ "sitemap",
219
+ "Sitemap - Generate sitemap for the project",
220
+ (yargs) => {
221
+ return yargs;
222
+ },
223
+ (argv) => {
224
+ if (argv.verbose)
225
+ console.log("Generating Sitemap");
226
+ process.exitCode = sitemap();
227
+ }
228
+ ).command(
229
+ "start",
230
+ "Start - Start project in browser",
231
+ (yargs) => {
232
+ return yargs;
233
+ },
234
+ (argv) => {
235
+ if (argv.verbose)
236
+ console.log("Starting");
237
+ process.exitCode = start();
238
+ }
239
+ ).demandCommand(1).command("*", "", () => {
240
+ console.error(import_chalk.default.yellow(`Command not found [${import_chalk.default.magenta(process.argv[2])}]`));
241
+ console.log(import_chalk.default.gray("Try 'yarn xy --help' for list of commands"));
242
+ }).help().argv;
243
+ };
244
+ // Annotate the CommonJS export names for ESM import in node:
245
+ 0 && (module.exports = {
246
+ analyze,
247
+ build,
248
+ buildci,
249
+ eject,
250
+ packageCompile,
251
+ packageCompileAsync,
252
+ rebuild,
253
+ sitemap,
254
+ start,
255
+ test,
256
+ xyReact,
257
+ xyReactBuildCommands
258
+ });
259
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/actions/package/compile.ts","../src/lib/xyReact.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,MAAA,cAAyB,GAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCmD/B,EAAA,CAAA,IAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"sources":["../src/index.ts","../src/actions/analyze.ts","../src/actions/build.ts","../src/actions/build-ci.ts","../src/actions/eject.ts","../src/actions/package/compile.ts","../src/actions/rebuild.ts","../src/actions/sitemap.ts","../src/actions/start.ts","../src/actions/test.ts","../src/lib/xyReact.ts","../src/lib/xyReactBuildCommands.ts"],"sourcesContent":["export * from './actions'\nexport * from './lib'\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const analyze = () => {\n return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.js']]])\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const build = () => {\n return runSteps('Build', [\n ['yarn', ['xy', 'compile']],\n ['yarn', 'xy lint'],\n ['yarn', 'xy deps'],\n ])\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const buildci = () => {\n return runSteps('Build', [\n ['yarn', ['xy', 'compile']],\n ['yarn', 'react-scripts build'],\n ['yarn', 'xy lint'],\n ['yarn', 'xy deps'],\n ['ts-node-script', './scripts/sitemap.ts'],\n ])\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","import { runSteps, runStepsAsync } from '@xylabs/ts-scripts-yarn3'\n\nexport const packageCompile = () => {\n return runSteps('Package Compile', [\n ['yarn', ['react-scripts', 'build']],\n ['ts-node-script', './scripts/sitemap.ts'],\n ])\n}\n\nexport const packageCompileAsync = () => {\n return runStepsAsync('Package Compile', [\n ['yarn', ['react-scripts', 'build']],\n ['ts-node-script', './scripts/sitemap.ts'],\n ])\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const rebuild = () => {\n return runSteps('Rebuild', [\n ['yarn', 'xy clean'],\n ['yarn', 'xy build'],\n ])\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 { xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from '@xylabs/ts-scripts-yarn3'\nimport chalk from 'chalk'\n\nimport { analyze, eject, sitemap, start } from '../actions'\nimport { xyReactBuildCommands } from './xyReactBuildCommands'\n\nexport const xyReact = () => {\n return xyReactBuildCommands(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 { compile, copyAssets } from '@xylabs/ts-scripts-yarn3'\nimport yargs from 'yargs'\n\nimport { build, buildci, rebuild } from '../actions'\n\nexport const xyReactBuildCommands = (args: yargs.Argv) => {\n return args\n .command(\n 'build',\n 'Build - Build React project && Packages',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Building')\n process.exitCode = build()\n },\n )\n .command(\n 'build-ci',\n 'Build CI - Build React project for continuous integration',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Building CI')\n process.exitCode = buildci()\n },\n )\n .command(\n 'compile [package]',\n 'Compile with Typescript & Copy Images',\n (yargs) => {\n return yargs.positional('package', {\n describe: 'Specific package to compile',\n })\n },\n async (argv) => {\n if (argv.verbose) console.log(`Compiling: ${argv.package ?? 'all'}`)\n process.exitCode = await compile({ target: argv.target as 'esm' | 'cjs' })\n },\n )\n .command(\n 'copy-assets [package]',\n 'Copy Assets - Copy the assets from src to dist',\n (yargs) => {\n return yargs.positional('package', {\n describe: 'Specific package to copy assets',\n })\n },\n async (argv) => {\n if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? 'all'}`)\n process.exitCode = await copyAssets({ target: argv.target as 'esm' | 'cjs' })\n },\n )\n .command(\n 'rebuild',\n 'Rebuild - Clean, Compile & Lint',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Rebuilding')\n process.exitCode = rebuild()\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,8BAAyB;AAElB,IAAM,UAAU,MAAM;AAC3B,aAAO,kCAAS,WAAW,CAAC,CAAC,QAAQ,CAAC,uBAAuB,sBAAsB,CAAC,CAAC,CAAC;AACxF;;;ACJA,IAAAA,2BAAyB;AAElB,IAAM,QAAQ,MAAM;AACzB,aAAO,mCAAS,SAAS;AAAA,IACvB,CAAC,QAAQ,CAAC,MAAM,SAAS,CAAC;AAAA,IAC1B,CAAC,QAAQ,SAAS;AAAA,IAClB,CAAC,QAAQ,SAAS;AAAA,EACpB,CAAC;AACH;;;ACRA,IAAAC,2BAAyB;AAElB,IAAM,UAAU,MAAM;AAC3B,aAAO,mCAAS,SAAS;AAAA,IACvB,CAAC,QAAQ,CAAC,MAAM,SAAS,CAAC;AAAA,IAC1B,CAAC,QAAQ,qBAAqB;AAAA,IAC9B,CAAC,QAAQ,SAAS;AAAA,IAClB,CAAC,QAAQ,SAAS;AAAA,IAClB,CAAC,kBAAkB,sB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AA,IACA;AAAA,IACA,CAAC,UAAU;AACT,aAAO;AAAA,IACT;AAAA,IACA,CAAC,SAAS;AACR,UAAI,KAAK;AAAS,gBAAQ,IAAI,WAAW;AACzC,cAAQ,WAAW,QAAQ;AAAA,IAC7B;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,IACA,CAAC,UAAU;AACT,aAAO;AAAA,IACT;AAAA,IACA,CAAC,SAAS;AACR,UAAI,KAAK;AAAS,gBAAQ,IAAI,UAAU;AACxC,cAAQ,WAAW,MAAM;AAAA,IAC3B;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,IACA,CAAC,UAAU;AACT,aAAO;AAAA,IACT;AAAA,IACA,CAAC,SAAS;AACR,UAAI,KAAK;AAAS,gBAAQ,IAAI,oBAAoB;AAClD,cAAQ,WAAW,QAAQ;AAAA,IAC7B;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,IACA,CAAC,UAAU;AACT,aAAO;AAAA,IACT;AAAA,IACA,CAAC,SAAS;AACR,UAAI,KAAK;AAAS,gBAAQ,IAAI,UAAU;AACxC,cAAQ,WAAW,MAAM;AAAA,IAC3B;AAAA,EACF,EACC,cAAc,CAAC,EACf,QAAQ,KAAK,IAAI,MAAM;AACtB,YAAQ,MAAM,aAAAC,QAAM,OAAO,sBAAsB,aAAAA,QAAM,QAAQ,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACnF,YAAQ,IAAI,aAAAA,QAAM,KAAK,2CAA2C,CAAC;AAAA,EACrE,CAAC,EACA,KAAK,EAAE;AACZ;","names":["import_ts_scripts_yarn3","import_ts_scripts_yarn3","import_ts_scripts_yarn3","import_ts_scripts_yarn3","import_ts_scripts_yarn3","import_ts_scripts_yarn3","import_ts_scripts_yarn3","import_ts_scripts_yarn3","import_ts_scripts_yarn3","import_ts_scripts_yarn3","chalk"]}
package/dist/index.mjs CHANGED
@@ -1,144 +1,211 @@
1
- import { runSteps, runStepsAsync, compile, copyAssets, xyInstallCommands, xyLintCommands, xyCommonCommands, xyParseOptions } from '@xylabs/ts-scripts-yarn3';
2
- import chalk from 'chalk';
3
-
4
- const analyze = () => {
5
- return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.js']]]);
1
+ // src/actions/analyze.ts
2
+ import { runSteps } from "@xylabs/ts-scripts-yarn3";
3
+ var analyze = () => {
4
+ return runSteps("Analyze", [["yarn", ["source-map-explorer", "build/static/js/*.js"]]]);
6
5
  };
7
6
 
8
- const build = () => {
9
- return runSteps('Build', [
10
- ['yarn', ['xy', 'compile']],
11
- ['yarn', 'xy lint'],
12
- ['yarn', 'xy deps'],
13
- ]);
7
+ // src/actions/build.ts
8
+ import { runSteps as runSteps2 } from "@xylabs/ts-scripts-yarn3";
9
+ var build = () => {
10
+ return runSteps2("Build", [
11
+ ["yarn", ["xy", "compile"]],
12
+ ["yarn", "xy lint"],
13
+ ["yarn", "xy deps"]
14
+ ]);
14
15
  };
15
16
 
16
- const buildci = () => {
17
- return runSteps('Build', [
18
- ['yarn', ['xy', 'compile']],
19
- ['yarn', 'react-scripts build'],
20
- ['yarn', 'xy lint'],
21
- ['yarn', 'xy deps'],
22
- ['ts-node-script', './scripts/sitemap.ts'],
23
- ]);
17
+ // src/actions/build-ci.ts
18
+ import { runSteps as runSteps3 } from "@xylabs/ts-scripts-yarn3";
19
+ var buildci = () => {
20
+ return runSteps3("Build", [
21
+ ["yarn", ["xy", "compile"]],
22
+ ["yarn", "react-scripts build"],
23
+ ["yarn", "xy lint"],
24
+ ["yarn", "xy deps"],
25
+ ["ts-node-script", "./scripts/sitemap.ts"]
26
+ ]);
24
27
  };
25
28
 
26
- const eject = () => {
27
- return runSteps('Eject', [['yarn', 'react-scripts eject']]);
29
+ // src/actions/eject.ts
30
+ import { runSteps as runSteps4 } from "@xylabs/ts-scripts-yarn3";
31
+ var eject = () => {
32
+ return runSteps4("Eject", [["yarn", "react-scripts eject"]]);
28
33
  };
29
34
 
30
- const packageCompile = () => {
31
- return runSteps('Package Compile', [
32
- ['yarn', ['react-scripts', 'build']],
33
- ['ts-node-script', './scripts/sitemap.ts'],
34
- ]);
35
+ // src/actions/package/compile.ts
36
+ import { runSteps as runSteps5, runStepsAsync } from "@xylabs/ts-scripts-yarn3";
37
+ var packageCompile = () => {
38
+ return runSteps5("Package Compile", [
39
+ ["yarn", ["react-scripts", "build"]],
40
+ ["ts-node-script", "./scripts/sitemap.ts"]
41
+ ]);
35
42
  };
36
- const packageCompileAsync = () => {
37
- return runStepsAsync('Package Compile', [
38
- ['yarn', ['react-scripts', 'build']],
39
- ['ts-node-script', './scripts/sitemap.ts'],
40
- ]);
43
+ var packageCompileAsync = () => {
44
+ return runStepsAsync("Package Compile", [
45
+ ["yarn", ["react-scripts", "build"]],
46
+ ["ts-node-script", "./scripts/sitemap.ts"]
47
+ ]);
41
48
  };
42
49
 
43
- const rebuild = () => {
44
- return runSteps('Rebuild', [
45
- ['yarn', 'xy clean'],
46
- ['yarn', 'xy build'],
47
- ]);
50
+ // src/actions/rebuild.ts
51
+ import { runSteps as runSteps6 } from "@xylabs/ts-scripts-yarn3";
52
+ var rebuild = () => {
53
+ return runSteps6("Rebuild", [
54
+ ["yarn", "xy clean"],
55
+ ["yarn", "xy build"]
56
+ ]);
48
57
  };
49
58
 
50
- const sitemap = () => {
51
- return runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']]);
59
+ // src/actions/sitemap.ts
60
+ import { runSteps as runSteps7 } from "@xylabs/ts-scripts-yarn3";
61
+ var sitemap = () => {
62
+ return runSteps7("Sitemap", [["ts-node-script", "./scripts/sitemap.ts"]]);
52
63
  };
53
64
 
54
- const start = () => {
55
- return runSteps('Start', [['yarn', 'react-scripts start']]);
65
+ // src/actions/start.ts
66
+ import { runSteps as runSteps8 } from "@xylabs/ts-scripts-yarn3";
67
+ var start = () => {
68
+ return runSteps8("Start", [["yarn", "react-scripts start"]]);
56
69
  };
57
70
 
58
- const test = () => {
59
- return runSteps('Test', [['yarn', 'react-scripts test']]);
71
+ // src/actions/test.ts
72
+ import { runSteps as runSteps9 } from "@xylabs/ts-scripts-yarn3";
73
+ var test = () => {
74
+ return runSteps9("Test", [["yarn", "react-scripts test"]]);
60
75
  };
61
76
 
62
- const xyReactBuildCommands = (args) => {
63
- return args
64
- .command('build', 'Build - Build React project && Packages', (yargs) => {
65
- return yargs;
66
- }, (argv) => {
67
- if (argv.verbose)
68
- console.log('Building');
69
- process.exitCode = build();
70
- })
71
- .command('build-ci', 'Build CI - Build React project for continuous integration', (yargs) => {
72
- return yargs;
73
- }, (argv) => {
74
- if (argv.verbose)
75
- console.log('Building CI');
76
- process.exitCode = buildci();
77
- })
78
- .command('compile [package]', 'Compile with Typescript & Copy Images', (yargs) => {
79
- return yargs.positional('package', {
80
- describe: 'Specific package to compile',
81
- });
82
- }, async (argv) => {
83
- if (argv.verbose)
84
- console.log(`Compiling: ${argv.package ?? 'all'}`);
85
- process.exitCode = await compile({ target: argv.target });
86
- })
87
- .command('copy-assets [package]', 'Copy Assets - Copy the assets from src to dist', (yargs) => {
88
- return yargs.positional('package', {
89
- describe: 'Specific package to copy assets',
90
- });
91
- }, async (argv) => {
92
- if (argv.verbose)
93
- console.log(`Copying Assets: ${argv.package ?? 'all'}`);
94
- process.exitCode = await copyAssets({ target: argv.target });
95
- })
96
- .command('rebuild', 'Rebuild - Clean, Compile & Lint', (yargs) => {
97
- return yargs;
98
- }, (argv) => {
99
- if (argv.verbose)
100
- console.log('Rebuilding');
101
- process.exitCode = rebuild();
102
- });
103
- };
77
+ // src/lib/xyReact.ts
78
+ import { xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from "@xylabs/ts-scripts-yarn3";
79
+ import chalk from "chalk";
104
80
 
105
- const xyReact = () => {
106
- return xyReactBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions())))))
107
- .command('analyze', 'Analyze - Analyze Bundles', (yargs) => {
108
- return yargs;
109
- }, (argv) => {
110
- if (argv.verbose)
111
- console.log('Analyzing');
112
- process.exitCode = analyze();
113
- })
114
- .command('eject', 'Eject - Eject React project', (yargs) => {
115
- return yargs;
116
- }, (argv) => {
117
- if (argv.verbose)
118
- console.log('Ejecting');
119
- process.exitCode = eject();
120
- })
121
- .command('sitemap', 'Sitemap - Generate sitemap for the project', (yargs) => {
122
- return yargs;
123
- }, (argv) => {
124
- if (argv.verbose)
125
- console.log('Generating Sitemap');
126
- process.exitCode = sitemap();
127
- })
128
- .command('start', 'Start - Start project in browser', (yargs) => {
129
- return yargs;
130
- }, (argv) => {
131
- if (argv.verbose)
132
- console.log('Starting');
133
- process.exitCode = start();
134
- })
135
- .demandCommand(1)
136
- .command('*', '', () => {
137
- console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`));
138
- console.log(chalk.gray("Try 'yarn xy --help' for list of commands"));
139
- })
140
- .help().argv;
81
+ // src/lib/xyReactBuildCommands.ts
82
+ import { compile, copyAssets } from "@xylabs/ts-scripts-yarn3";
83
+ var xyReactBuildCommands = (args) => {
84
+ return args.command(
85
+ "build",
86
+ "Build - Build React project && Packages",
87
+ (yargs) => {
88
+ return yargs;
89
+ },
90
+ (argv) => {
91
+ if (argv.verbose)
92
+ console.log("Building");
93
+ process.exitCode = build();
94
+ }
95
+ ).command(
96
+ "build-ci",
97
+ "Build CI - Build React project for continuous integration",
98
+ (yargs) => {
99
+ return yargs;
100
+ },
101
+ (argv) => {
102
+ if (argv.verbose)
103
+ console.log("Building CI");
104
+ process.exitCode = buildci();
105
+ }
106
+ ).command(
107
+ "compile [package]",
108
+ "Compile with Typescript & Copy Images",
109
+ (yargs) => {
110
+ return yargs.positional("package", {
111
+ describe: "Specific package to compile"
112
+ });
113
+ },
114
+ async (argv) => {
115
+ if (argv.verbose)
116
+ console.log(`Compiling: ${argv.package ?? "all"}`);
117
+ process.exitCode = await compile({ target: argv.target });
118
+ }
119
+ ).command(
120
+ "copy-assets [package]",
121
+ "Copy Assets - Copy the assets from src to dist",
122
+ (yargs) => {
123
+ return yargs.positional("package", {
124
+ describe: "Specific package to copy assets"
125
+ });
126
+ },
127
+ async (argv) => {
128
+ if (argv.verbose)
129
+ console.log(`Copying Assets: ${argv.package ?? "all"}`);
130
+ process.exitCode = await copyAssets({ target: argv.target });
131
+ }
132
+ ).command(
133
+ "rebuild",
134
+ "Rebuild - Clean, Compile & Lint",
135
+ (yargs) => {
136
+ return yargs;
137
+ },
138
+ (argv) => {
139
+ if (argv.verbose)
140
+ console.log("Rebuilding");
141
+ process.exitCode = rebuild();
142
+ }
143
+ );
141
144
  };
142
145
 
143
- export { analyze, build, buildci, eject, packageCompile, packageCompileAsync, rebuild, sitemap, start, test, xyReact, xyReactBuildCommands };
144
- //# sourceMappingURL=index.mjs.map
146
+ // src/lib/xyReact.ts
147
+ var xyReact = () => {
148
+ return xyReactBuildCommands(xyInstallCommands(xyLintCommands(xyInstallCommands(xyCommonCommands(xyParseOptions()))))).command(
149
+ "analyze",
150
+ "Analyze - Analyze Bundles",
151
+ (yargs) => {
152
+ return yargs;
153
+ },
154
+ (argv) => {
155
+ if (argv.verbose)
156
+ console.log("Analyzing");
157
+ process.exitCode = analyze();
158
+ }
159
+ ).command(
160
+ "eject",
161
+ "Eject - Eject React project",
162
+ (yargs) => {
163
+ return yargs;
164
+ },
165
+ (argv) => {
166
+ if (argv.verbose)
167
+ console.log("Ejecting");
168
+ process.exitCode = eject();
169
+ }
170
+ ).command(
171
+ "sitemap",
172
+ "Sitemap - Generate sitemap for the project",
173
+ (yargs) => {
174
+ return yargs;
175
+ },
176
+ (argv) => {
177
+ if (argv.verbose)
178
+ console.log("Generating Sitemap");
179
+ process.exitCode = sitemap();
180
+ }
181
+ ).command(
182
+ "start",
183
+ "Start - Start project in browser",
184
+ (yargs) => {
185
+ return yargs;
186
+ },
187
+ (argv) => {
188
+ if (argv.verbose)
189
+ console.log("Starting");
190
+ process.exitCode = start();
191
+ }
192
+ ).demandCommand(1).command("*", "", () => {
193
+ console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`));
194
+ console.log(chalk.gray("Try 'yarn xy --help' for list of commands"));
195
+ }).help().argv;
196
+ };
197
+ export {
198
+ analyze,
199
+ build,
200
+ buildci,
201
+ eject,
202
+ packageCompile,
203
+ packageCompileAsync,
204
+ rebuild,
205
+ sitemap,
206
+ start,
207
+ test,
208
+ xyReact,
209
+ xyReactBuildCommands
210
+ };
211
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/actions/package/compile.ts","../src/lib/xyReact.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,MAAA,cAAyB,GAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCmD/B,EAAA,CAAA,IAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"sources":["../src/actions/analyze.ts","../src/actions/build.ts","../src/actions/build-ci.ts","../src/actions/eject.ts","../src/actions/package/compile.ts","../src/actions/rebuild.ts","../src/actions/sitemap.ts","../src/actions/start.ts","../src/actions/test.ts","../src/lib/xyReact.ts","../src/lib/xyReactBuildCommands.ts"],"sourcesContent":["import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const analyze = () => {\n return runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.js']]])\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const build = () => {\n return runSteps('Build', [\n ['yarn', ['xy', 'compile']],\n ['yarn', 'xy lint'],\n ['yarn', 'xy deps'],\n ])\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const buildci = () => {\n return runSteps('Build', [\n ['yarn', ['xy', 'compile']],\n ['yarn', 'react-scripts build'],\n ['yarn', 'xy lint'],\n ['yarn', 'xy deps'],\n ['ts-node-script', './scripts/sitemap.ts'],\n ])\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","import { runSteps, runStepsAsync } from '@xylabs/ts-scripts-yarn3'\n\nexport const packageCompile = () => {\n return runSteps('Package Compile', [\n ['yarn', ['react-scripts', 'build']],\n ['ts-node-script', './scripts/sitemap.ts'],\n ])\n}\n\nexport const packageCompileAsync = () => {\n return runStepsAsync('Package Compile', [\n ['yarn', ['react-scripts', 'build']],\n ['ts-node-script', './scripts/sitemap.ts'],\n ])\n}\n","import { runSteps } from '@xylabs/ts-scripts-yarn3'\n\nexport const rebuild = () => {\n return runSteps('Rebuild', [\n ['yarn', 'xy clean'],\n ['yarn', 'xy build'],\n ])\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 { xyCommonCommands, xyInstallCommands, xyLintCommands, xyParseOptions } from '@xylabs/ts-scripts-yarn3'\nimport chalk from 'chalk'\n\nimport { analyze, eject, sitemap, start } from '../actions'\nimport { xyReactBuildCommands } from './xyReactBuildCommands'\n\nexport const xyReact = () => {\n return xyReactBuildCommands(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 { compile, copyAssets } from '@xylabs/ts-scripts-yarn3'\nimport yargs from 'yargs'\n\nimport { build, buildci, rebuild } from '../actions'\n\nexport const xyReactBuildCommands = (args: yargs.Argv) => {\n return args\n .command(\n 'build',\n 'Build - Build React project && Packages',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Building')\n process.exitCode = build()\n },\n )\n .command(\n 'build-ci',\n 'Build CI - Build React project for continuous integration',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Building CI')\n process.exitCode = buildci()\n },\n )\n .command(\n 'compile [package]',\n 'Compile with Typescript & Copy Images',\n (yargs) => {\n return yargs.positional('package', {\n describe: 'Specific package to compile',\n })\n },\n async (argv) => {\n if (argv.verbose) console.log(`Compiling: ${argv.package ?? 'all'}`)\n process.exitCode = await compile({ target: argv.target as 'esm' | 'cjs' })\n },\n )\n .command(\n 'copy-assets [package]',\n 'Copy Assets - Copy the assets from src to dist',\n (yargs) => {\n return yargs.positional('package', {\n describe: 'Specific package to copy assets',\n })\n },\n async (argv) => {\n if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? 'all'}`)\n process.exitCode = await copyAssets({ target: argv.target as 'esm' | 'cjs' })\n },\n )\n .command(\n 'rebuild',\n 'Rebuild - Clean, Compile & Lint',\n (yargs) => {\n return yargs\n },\n (argv) => {\n if (argv.verbose) console.log('Rebuilding')\n process.exitCode = rebuild()\n },\n )\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AAElB,IAAM,UAAU,MAAM;AAC3B,SAAO,SAAS,WAAW,CAAC,CAAC,QAAQ,CAAC,uBAAuB,sBAAsB,CAAC,CAAC,CAAC;AACxF;;;ACJA,SAAS,YAAAA,iBAAgB;AAElB,IAAM,QAAQ,MAAM;AACzB,SAAOA,UAAS,SAAS;AAAA,IACvB,CAAC,QAAQ,CAAC,MAAM,SAAS,CAAC;AAAA,IAC1B,CAAC,QAAQ,SAAS;AAAA,IAClB,CAAC,QAAQ,SAAS;AAAA,EACpB,CAAC;AACH;;;ACRA,SAAS,YAAAC,iBAAgB;AAElB,IAAM,UAAU,MAAM;AAC3B,SAAOA,UAAS,SAAS;AAAA,IACvB,CAAC,QAAQ,CAAC,MAAM,SAAS,CAAC;AAAA,IAC1B,CAAC,QAAQ,qBAAqB;AAAA,IAC9B,CAAC,QAAQ,SAAS;AAAA,IAClB,CAAC,QAAQ,SAAS;AAAA,IAClB,CAAC,kBAAkB,sBAAsB;AAAA,EAC3C,CAAC;AACH;;;ACTA,SAAS,YAAAC,iBAAgB;AAElB,IAAM,QAAQ,MAAM;AACzB,SAAOA,UAAS,SAAS,CAAC,CAAC,QAAQ,qBAAqB,CAAC,CAAC;AAC5D;;;ACLA,SAAS,YAAAC,WAAU,qBAAqB;AAEjC,IAAM,iBAAiB,MAAM;AAClC,SAAOA,UAAS,mBAAmB;AAAA,IACjC,CAAC,QAAQ,CAAC,iBAAiB,OAAO,CAAC;AAAA,IACnC,CAAC,kBAAkB,sBAAsB;AAAA,EAC3C,CAAC;AACH;AAEO,IAAM,sBAAsB,MAAM;AACvC,SAAO,cAAc,mBAAmB;AAAA,IACtC,CAAC,QAAQ,CAAC,iBAAiB,OAAO,CAAC;AAAA,IACnC,CAAC,kB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AAAA,IACT;AAAA,IACA,CAAC,SAAS;AACR,UAAI,KAAK;AAAS,gBAAQ,IAAI,oBAAoB;AAClD,cAAQ,WAAW,QAAQ;AAAA,IAC7B;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,IACA,CAAC,UAAU;AACT,aAAO;AAAA,IACT;AAAA,IACA,CAAC,SAAS;AACR,UAAI,KAAK;AAAS,gBAAQ,IAAI,UAAU;AACxC,cAAQ,WAAW,MAAM;AAAA,IAC3B;AAAA,EACF,EACC,cAAc,CAAC,EACf,QAAQ,KAAK,IAAI,MAAM;AACtB,YAAQ,MAAM,MAAM,OAAO,sBAAsB,MAAM,QAAQ,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACnF,YAAQ,IAAI,MAAM,KAAK,2CAA2C,CAAC;AAAA,EACrE,CAAC,EACA,KAAK,EAAE;AACZ;","names":["runSteps","runSteps","runSteps","runSteps","runSteps","runSteps","runSteps","runSteps"]}
package/package.json CHANGED
@@ -49,11 +49,11 @@
49
49
  "url": "https://github.com/xylabs/config/issues"
50
50
  },
51
51
  "dependencies": {
52
- "@babel/core": "^7.22.19",
52
+ "@babel/core": "^7.22.17",
53
53
  "@babel/preset-env": "^7.22.15",
54
54
  "@types/node": "^20.6.0",
55
- "@xylabs/eslint-config": "~3.0.0-rc.16",
56
- "@xylabs/ts-scripts-yarn3": "~3.0.0-rc.16",
55
+ "@xylabs/eslint-config": "~3.0.0-rc.2",
56
+ "@xylabs/ts-scripts-yarn3": "~3.0.0-rc.2",
57
57
  "chalk": "^4.1.2",
58
58
  "cpy": "^8.1.2",
59
59
  "depcheck": "^1.4.6",
@@ -61,14 +61,14 @@
61
61
  "eslint-config-prettier": "^9.0.0",
62
62
  "eslint-plugin-prettier": "^5.0.0",
63
63
  "eslint-plugin-sonarjs": "^0.21.0",
64
- "jest": "^29.7.0",
65
- "jest-environment-jsdom": "^29.7.0",
64
+ "jest": "^29.6.4",
65
+ "jest-environment-jsdom": "^29.6.4",
66
66
  "jest-extended": "^4.0.1",
67
67
  "jest-mock-extended": "^3.0.5",
68
68
  "jest-sorted": "^1.0.14",
69
69
  "license-checker": "^25.0.1",
70
70
  "node-cmd": "^5.0.0",
71
- "npm-check-updates": "^16.14.2",
71
+ "npm-check-updates": "^16.13.3",
72
72
  "npm-package-json-lint": "^7.0.0",
73
73
  "npm-package-json-lint-config-default": "^6.0.0",
74
74
  "parse-git-config": "^3.0.0",
@@ -84,8 +84,8 @@
84
84
  "devDependencies": {
85
85
  "@types/json-schema": "^7.0.12",
86
86
  "@types/yargs": "^17.0.24",
87
- "@xylabs/ts-scripts-yarn3": "~3.0.0-rc.16",
88
- "@xylabs/tsconfig": "~3.0.0-rc.16",
87
+ "@xylabs/ts-scripts-yarn3": "~3.0.0-rc.2",
88
+ "@xylabs/tsconfig": "~3.0.0-rc.2",
89
89
  "publint": "^0.2.2",
90
90
  "tsup": "^7.2.0",
91
91
  "typescript": "^5.2.2"
@@ -138,7 +138,10 @@
138
138
  "engines": {
139
139
  "node": ">=14.16"
140
140
  },
141
+ "scripts": {
142
+ "package-compile": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly --declaration && publint"
143
+ },
141
144
  "sideEffects": false,
142
- "version": "3.0.0-rc.16",
145
+ "version": "3.0.0-rc.2",
143
146
  "stableVersion": "2.19.12"
144
147
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA"}