ember-codemod-remove-ember-css-modules
Version:
Codemod to replace ember-css-modules with embroider-css-modules
33 lines (32 loc) • 968 B
JavaScript
;
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { removeEmberCssModules } from '../src/index.js';
// Provide a title to the process in `ps`
process.title = 'ember-codemod-remove-ember-css-modules';
// Set codemod options
const argv = yargs(hideBin(process.argv))
.option('component-structure', {
choices: ['flat', 'nested'],
default: 'flat',
describe: 'Component structure (how your components are colocated)',
type: 'string',
})
.option('root', {
describe: 'Location of your Ember project',
type: 'string',
})
.option('type', {
choices: ['app', 'v2-addon'],
demandOption: true,
describe: 'Type of your Ember project',
type: 'string',
})
.parseSync();
const codemodOptions = {
componentStructure: argv['component-structure'],
projectRoot: argv['root'] ?? process.cwd(),
projectType: argv['type'],
};
removeEmberCssModules(codemodOptions);