ember-codemod-pod-to-octane
Version:
Codemod to un-pod Ember apps, addons, and engines
38 lines (37 loc) • 968 B
JavaScript
;
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { runCodemod } from '../src/index.js';
// Provide a title to the process in `ps`
process.title = 'ember-codemod-pod-to-octane';
// Set codemod options
const argv = yargs(hideBin(process.argv))
.option('pod-path', {
default: '',
describe: 'Namespace used for the pod layout',
type: 'string',
})
.option('root', {
describe: 'Location of your Ember project',
type: 'string',
})
.option('test', {
default: false,
describe: 'Do a test run?',
type: 'boolean',
})
.option('type', {
choices: ['app', 'v1-addon'],
demandOption: true,
describe: 'Type of your Ember project',
type: 'string',
})
.parseSync();
const codemodOptions = {
podPath: argv['pod-path'],
projectRoot: argv['root'] ?? process.cwd(),
projectType: argv['type'],
testRun: argv['test'],
};
runCodemod(codemodOptions);