@xylabs/ts-scripts-react-yarn3 3.0.0-rc.4 → 3.0.0-rc.6
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 +3 -34
- package/dist/index.d.mts.map +1 -0
- package/dist/index.js +133 -235
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +122 -189
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -12
package/dist/index.d.mts
CHANGED
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 };
|
|
1
|
+
export * from './actions';
|
|
2
|
+
export * from './lib';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,259 +1,157 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
'use strict';
|
|
29
2
|
|
|
30
|
-
|
|
31
|
-
var
|
|
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);
|
|
3
|
+
var tsScriptsYarn3 = require('@xylabs/ts-scripts-yarn3');
|
|
4
|
+
var chalk = require('chalk');
|
|
47
5
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var analyze = () => {
|
|
51
|
-
return (0, import_ts_scripts_yarn3.runSteps)("Analyze", [["yarn", ["source-map-explorer", "build/static/js/*.js"]]]);
|
|
6
|
+
const analyze = () => {
|
|
7
|
+
return tsScriptsYarn3.runSteps('Analyze', [['yarn', ['source-map-explorer', 'build/static/js/*.js']]]);
|
|
52
8
|
};
|
|
53
9
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
["yarn", "xy deps"]
|
|
61
|
-
]);
|
|
10
|
+
const build = () => {
|
|
11
|
+
return tsScriptsYarn3.runSteps('Build', [
|
|
12
|
+
['yarn', ['xy', 'compile']],
|
|
13
|
+
['yarn', 'xy lint'],
|
|
14
|
+
['yarn', 'xy deps'],
|
|
15
|
+
]);
|
|
62
16
|
};
|
|
63
17
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
["ts-node-script", "./scripts/sitemap.ts"]
|
|
73
|
-
]);
|
|
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
|
+
]);
|
|
74
26
|
};
|
|
75
27
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var eject = () => {
|
|
79
|
-
return (0, import_ts_scripts_yarn34.runSteps)("Eject", [["yarn", "react-scripts eject"]]);
|
|
28
|
+
const eject = () => {
|
|
29
|
+
return tsScriptsYarn3.runSteps('Eject', [['yarn', 'react-scripts eject']]);
|
|
80
30
|
};
|
|
81
31
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
["ts-node-script", "./scripts/sitemap.ts"]
|
|
88
|
-
]);
|
|
32
|
+
const packageCompile = () => {
|
|
33
|
+
return tsScriptsYarn3.runSteps('Package Compile', [
|
|
34
|
+
['yarn', ['react-scripts', 'build']],
|
|
35
|
+
['ts-node-script', './scripts/sitemap.ts'],
|
|
36
|
+
]);
|
|
89
37
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
38
|
+
const packageCompileAsync = () => {
|
|
39
|
+
return tsScriptsYarn3.runStepsAsync('Package Compile', [
|
|
40
|
+
['yarn', ['react-scripts', 'build']],
|
|
41
|
+
['ts-node-script', './scripts/sitemap.ts'],
|
|
42
|
+
]);
|
|
95
43
|
};
|
|
96
44
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
["yarn", "xy build"]
|
|
103
|
-
]);
|
|
45
|
+
const rebuild = () => {
|
|
46
|
+
return tsScriptsYarn3.runSteps('Rebuild', [
|
|
47
|
+
['yarn', 'xy clean'],
|
|
48
|
+
['yarn', 'xy build'],
|
|
49
|
+
]);
|
|
104
50
|
};
|
|
105
51
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var sitemap = () => {
|
|
109
|
-
return (0, import_ts_scripts_yarn37.runSteps)("Sitemap", [["ts-node-script", "./scripts/sitemap.ts"]]);
|
|
52
|
+
const sitemap = () => {
|
|
53
|
+
return tsScriptsYarn3.runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']]);
|
|
110
54
|
};
|
|
111
55
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
var start = () => {
|
|
115
|
-
return (0, import_ts_scripts_yarn38.runSteps)("Start", [["yarn", "react-scripts start"]]);
|
|
56
|
+
const start = () => {
|
|
57
|
+
return tsScriptsYarn3.runSteps('Start', [['yarn', 'react-scripts start']]);
|
|
116
58
|
};
|
|
117
59
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
var test = () => {
|
|
121
|
-
return (0, import_ts_scripts_yarn39.runSteps)("Test", [["yarn", "react-scripts test"]]);
|
|
60
|
+
const test = () => {
|
|
61
|
+
return tsScriptsYarn3.runSteps('Test', [['yarn', 'react-scripts test']]);
|
|
122
62
|
};
|
|
123
63
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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
|
-
);
|
|
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
|
+
});
|
|
191
105
|
};
|
|
192
106
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
console.
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
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;
|
|
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;
|
|
243
143
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
});
|
|
259
|
-
//# sourceMappingURL=index.js.map
|
|
144
|
+
|
|
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
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,211 +1,144 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
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']]]);
|
|
5
6
|
};
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
["yarn", "xy deps"]
|
|
14
|
-
]);
|
|
8
|
+
const build = () => {
|
|
9
|
+
return runSteps('Build', [
|
|
10
|
+
['yarn', ['xy', 'compile']],
|
|
11
|
+
['yarn', 'xy lint'],
|
|
12
|
+
['yarn', 'xy deps'],
|
|
13
|
+
]);
|
|
15
14
|
};
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
["ts-node-script", "./scripts/sitemap.ts"]
|
|
26
|
-
]);
|
|
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
|
+
]);
|
|
27
24
|
};
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var eject = () => {
|
|
32
|
-
return runSteps4("Eject", [["yarn", "react-scripts eject"]]);
|
|
26
|
+
const eject = () => {
|
|
27
|
+
return runSteps('Eject', [['yarn', 'react-scripts eject']]);
|
|
33
28
|
};
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
["ts-node-script", "./scripts/sitemap.ts"]
|
|
41
|
-
]);
|
|
30
|
+
const packageCompile = () => {
|
|
31
|
+
return runSteps('Package Compile', [
|
|
32
|
+
['yarn', ['react-scripts', 'build']],
|
|
33
|
+
['ts-node-script', './scripts/sitemap.ts'],
|
|
34
|
+
]);
|
|
42
35
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
const packageCompileAsync = () => {
|
|
37
|
+
return runStepsAsync('Package Compile', [
|
|
38
|
+
['yarn', ['react-scripts', 'build']],
|
|
39
|
+
['ts-node-script', './scripts/sitemap.ts'],
|
|
40
|
+
]);
|
|
48
41
|
};
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
["yarn", "xy build"]
|
|
56
|
-
]);
|
|
43
|
+
const rebuild = () => {
|
|
44
|
+
return runSteps('Rebuild', [
|
|
45
|
+
['yarn', 'xy clean'],
|
|
46
|
+
['yarn', 'xy build'],
|
|
47
|
+
]);
|
|
57
48
|
};
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var sitemap = () => {
|
|
62
|
-
return runSteps7("Sitemap", [["ts-node-script", "./scripts/sitemap.ts"]]);
|
|
50
|
+
const sitemap = () => {
|
|
51
|
+
return runSteps('Sitemap', [['ts-node-script', './scripts/sitemap.ts']]);
|
|
63
52
|
};
|
|
64
53
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var start = () => {
|
|
68
|
-
return runSteps8("Start", [["yarn", "react-scripts start"]]);
|
|
54
|
+
const start = () => {
|
|
55
|
+
return runSteps('Start', [['yarn', 'react-scripts start']]);
|
|
69
56
|
};
|
|
70
57
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
var test = () => {
|
|
74
|
-
return runSteps9("Test", [["yarn", "react-scripts test"]]);
|
|
58
|
+
const test = () => {
|
|
59
|
+
return runSteps('Test', [['yarn', 'react-scripts test']]);
|
|
75
60
|
};
|
|
76
61
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
);
|
|
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
|
+
});
|
|
144
103
|
};
|
|
145
104
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
console.
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
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;
|
|
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;
|
|
196
141
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
|
142
|
+
|
|
143
|
+
export { analyze, build, buildci, eject, packageCompile, packageCompileAsync, rebuild, sitemap, start, test, xyReact, xyReactBuildCommands };
|
|
144
|
+
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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.
|
|
52
|
+
"@babel/core": "^7.22.19",
|
|
53
53
|
"@babel/preset-env": "^7.22.15",
|
|
54
54
|
"@types/node": "^20.6.0",
|
|
55
|
-
"@xylabs/eslint-config": "~3.0.0-rc.
|
|
56
|
-
"@xylabs/ts-scripts-yarn3": "~3.0.0-rc.
|
|
55
|
+
"@xylabs/eslint-config": "~3.0.0-rc.6",
|
|
56
|
+
"@xylabs/ts-scripts-yarn3": "~3.0.0-rc.6",
|
|
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.
|
|
65
|
-
"jest-environment-jsdom": "^29.
|
|
64
|
+
"jest": "^29.7.0",
|
|
65
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
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.
|
|
71
|
+
"npm-check-updates": "^16.14.2",
|
|
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.
|
|
88
|
-
"@xylabs/tsconfig": "~3.0.0-rc.
|
|
87
|
+
"@xylabs/ts-scripts-yarn3": "~3.0.0-rc.6",
|
|
88
|
+
"@xylabs/tsconfig": "~3.0.0-rc.6",
|
|
89
89
|
"publint": "^0.2.2",
|
|
90
90
|
"tsup": "^7.2.0",
|
|
91
91
|
"typescript": "^5.2.2"
|
|
@@ -138,10 +138,7 @@
|
|
|
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
|
-
},
|
|
144
141
|
"sideEffects": false,
|
|
145
|
-
"version": "3.0.0-rc.
|
|
142
|
+
"version": "3.0.0-rc.6",
|
|
146
143
|
"stableVersion": "2.19.12"
|
|
147
144
|
}
|