2023-12-11 15:58:45 +02:00
|
|
|
import buildAll from './commands/buildAll';
|
|
|
|
import editPatch from './commands/editPatch';
|
|
|
|
const yargs = require('yargs');
|
|
|
|
|
|
|
|
|
|
|
|
const build = () => {
|
|
|
|
yargs
|
|
|
|
.usage('$0 <cmd> [args]')
|
2024-04-05 13:16:49 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
2023-12-11 15:58:45 +02:00
|
|
|
.command('build <outputDir>', 'build all', (yargs: any) => {
|
|
|
|
yargs.positional('outputDir', {
|
|
|
|
type: 'string',
|
|
|
|
describe: 'Path to the parent directory for built output',
|
|
|
|
});
|
2024-04-05 13:16:49 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
2023-12-11 15:58:45 +02:00
|
|
|
}, async (args: any) => {
|
|
|
|
await buildAll(args.outputDir);
|
|
|
|
process.exit(0);
|
|
|
|
})
|
2024-04-05 13:16:49 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
2024-01-28 20:53:13 +02:00
|
|
|
.command('patch-plugin <plugin>', 'Edit the patch file for the given plugin ID', (yargs: any) => {
|
2023-12-11 15:58:45 +02:00
|
|
|
yargs.positional('plugin', {
|
|
|
|
type: 'string',
|
|
|
|
describe: 'ID of the plugin to patch',
|
|
|
|
});
|
2024-04-05 13:16:49 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
2023-12-11 15:58:45 +02:00
|
|
|
}, async (args: any) => {
|
|
|
|
await editPatch(args.plugin, null);
|
|
|
|
process.exit(0);
|
|
|
|
})
|
|
|
|
.help()
|
|
|
|
.argv;
|
|
|
|
};
|
|
|
|
|
|
|
|
build();
|