Skip to content

Commit

Permalink
fix: copy correct templates during instructions run
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jul 27, 2019
1 parent 21704c7 commit 01689a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
13 changes: 6 additions & 7 deletions instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { join } from 'path'
import * as sinkStatic from '@adonisjs/sink'
import { Application } from '@poppinss/application'
import { ApplicationContract } from '@poppinss/application'

const templates = ['app.ts', 'cors.ts', 'hash.ts']

Expand All @@ -18,15 +18,14 @@ const templates = ['app.ts', 'cors.ts', 'hash.ts']
*/
export default function instructions (
projectRoot: string,
application: Application,
application: ApplicationContract,
{ TemplateFile }: typeof sinkStatic,
) {
templates.forEach((filename) => {
new TemplateFile(
projectRoot,
application.configPath(filename),
join(__dirname, './config/app.ts'),
)
const dest = application.configPath(filename)
const src = join(__dirname, 'config', filename)

new TemplateFile(projectRoot, dest, src)
.apply({})
.commit()
})
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"devDependencies": {
"@adonisjs/fold": "^6.1.0",
"@adonisjs/mrm-preset": "^2.0.3",
"@adonisjs/sink": "^2.0.1",
"@adonisjs/sink": "^2.0.4",
"@poppinss/dev-utils": "^1.0.0",
"@types/node": "^12.6.8",
"commitizen": "^4.0.3",
Expand Down

0 comments on commit 01689a7

Please sign in to comment.