From 9e7b843d7c84c5f373a79578e9d4726d7960153d Mon Sep 17 00:00:00 2001 From: Harminder virk Date: Thu, 10 Oct 2019 14:47:39 +0530 Subject: [PATCH] refactor: add extra patterns to rcFile for web boilerplate --- tasks/createRcFile.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tasks/createRcFile.ts b/tasks/createRcFile.ts index 9fd5323..17bb1fc 100644 --- a/tasks/createRcFile.ts +++ b/tasks/createRcFile.ts @@ -15,7 +15,7 @@ import { TaskFn } from '../src/contracts' /** * Creates the `.adonisrc.json` file in the project root */ -const task: TaskFn = (absPath) => { +const task: TaskFn = (absPath, _app, state) => { const rcFile = new RcFile(absPath) rcFile.setExceptionHandler('App/Exceptions/Handler') @@ -29,6 +29,14 @@ const task: TaskFn = (absPath) => { rcFile.addMetaFile('.adonisrc.json') rcFile.addMetaFile('.gitignore') + /** + * Extra files for the web boilerplate + */ + if (state.boilerplate === 'web') { + rcFile.addMetaFile('resources/views/**/*.edge') + rcFile.addMetaFile('public/**') + } + rcFile.commit() fancyLogs.create({ message: '.adonisrc.json', icon: false }) }