@jrmc/adonis-attachment
Version:
Turn any field on your Lucid model to an attachment data type
22 lines (21 loc) • 601 B
JavaScript
/**
* @jrmc/adonis-attachment
*
* @license MIT
* @copyright Jeremy Chaufourier <jeremy@chaufourier.fr>
*/
import { stubsRoot } from './stubs/main.js';
export async function configure(command) {
const codemods = await command.createCodemods();
/**
* Create default config file
*/
await codemods.makeUsingStub(stubsRoot, 'config.stub', {});
/**
* Register provider
*/
await codemods.updateRcFile((rcFile) => {
rcFile.addProvider('@jrmc/adonis-attachment/attachment_provider');
rcFile.addCommand('@jrmc/adonis-attachment/commands');
});
}