Skip to content

Commit 01689a7

Browse files
committed
fix: copy correct templates during instructions run
1 parent 21704c7 commit 01689a7

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

instructions.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import { join } from 'path'
1111
import * as sinkStatic from '@adonisjs/sink'
12-
import { Application } from '@poppinss/application'
12+
import { ApplicationContract } from '@poppinss/application'
1313

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

@@ -18,15 +18,14 @@ const templates = ['app.ts', 'cors.ts', 'hash.ts']
1818
*/
1919
export default function instructions (
2020
projectRoot: string,
21-
application: Application,
21+
application: ApplicationContract,
2222
{ TemplateFile }: typeof sinkStatic,
2323
) {
2424
templates.forEach((filename) => {
25-
new TemplateFile(
26-
projectRoot,
27-
application.configPath(filename),
28-
join(__dirname, './config/app.ts'),
29-
)
25+
const dest = application.configPath(filename)
26+
const src = join(__dirname, 'config', filename)
27+
28+
new TemplateFile(projectRoot, dest, src)
3029
.apply({})
3130
.commit()
3231
})

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"devDependencies": {
4444
"@adonisjs/fold": "^6.1.0",
4545
"@adonisjs/mrm-preset": "^2.0.3",
46-
"@adonisjs/sink": "^2.0.1",
46+
"@adonisjs/sink": "^2.0.4",
4747
"@poppinss/dev-utils": "^1.0.0",
4848
"@types/node": "^12.6.8",
4949
"commitizen": "^4.0.3",

0 commit comments

Comments
 (0)