Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
refactor: add extra patterns to rcFile for web boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 10, 2019
1 parent 0483dc6 commit 9e7b843
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tasks/createRcFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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 })
}
Expand Down

0 comments on commit 9e7b843

Please sign in to comment.