From 04748eec5f1b789d59c3be7cd2011a64006ea85e Mon Sep 17 00:00:00 2001 From: daffl Date: Wed, 29 May 2024 15:08:03 -0600 Subject: [PATCH] Styling --- packages/generators/src/connection/templates/knex.tpl.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/generators/src/connection/templates/knex.tpl.ts b/packages/generators/src/connection/templates/knex.tpl.ts index 1164311f0e..afa6ef6d79 100644 --- a/packages/generators/src/connection/templates/knex.tpl.ts +++ b/packages/generators/src/connection/templates/knex.tpl.ts @@ -54,15 +54,16 @@ export const generate = (ctx: ConnectionGeneratorContext) => ) .then(renderSource(knexfile, toFile('knexfile'))) .then( - mergeJSON((ctx) => { - return { + mergeJSON( + (ctx) => ({ scripts: { migrate: 'knex migrate:latest', 'migrate:make': 'knex migrate:make' + (ctx.language === 'js' ? ' -x mjs' : ''), test: 'cross-env NODE_ENV=test npm run migrate && npm run mocha' } - } - }, toFile('package.json')) + }), + toFile('package.json') + ) ) .then(injectSource(importTemplate, before('import { services } from'), toAppFile)) .then(injectSource(configureTemplate, before('app.configure(services)'), toAppFile))