adonisjs-livewire
Version:
A front-end framework for AdonisJS
30 lines (29 loc) • 1.09 kB
JavaScript
/*
|--------------------------------------------------------------------------
| Configure hook
|--------------------------------------------------------------------------
|
| The configure hook is called when someone runs "node ace configure <package>"
| command. You are free to perform any operations inside this function to
| configure the package.
|
| To make things easier, you have access to the underlying "ConfigureCommand"
| instance and you can use codemods to modify the source files.
|
*/
import { stubsRoot } from './index.js';
export async function configure(command) {
const codemods = await command.createCodemods();
await codemods.makeUsingStub(stubsRoot, 'config/livewire.stub', {});
await codemods.updateRcFile((rcFile) => {
rcFile.addProvider('adonisjs-livewire/livewire_provider');
rcFile.addProvider('adonisjs-livewire/view_provider');
rcFile.addCommand('adonisjs-livewire/commands');
});
// await codemods.installPackages([
// {
// name: 'edge.js',
// isDevDependency: false,
// },
// ])
}