From ab99109bbf74074b043a35fb16c1716d8db8818a Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 5 Oct 2022 11:51:06 +0700 Subject: [PATCH] Added support for running Portal from the monorepo refs https://github.com/TryGhost/Toolbox/issues/426 - this adds support for `--portal` in `yarn dev` to support the upcoming migration of Portal into the monorepo - also adds the Portal folder to the ignorelist for nodemon so Ghost doesn't bootloop --- .github/dev.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/dev.js b/.github/dev.js index 584fc2ed70..b7d1ea6258 100644 --- a/.github/dev.js +++ b/.github/dev.js @@ -10,7 +10,7 @@ let commands = []; const COMMAND_GHOST = { name: 'ghost', - command: 'yarn nodemon -q -i ghost/admin -i ghost/core/content -i ghost/core/core/built', + command: 'yarn nodemon -q -i ghost/admin -i ghost/core/content -i ghost/core/core/built -i ghost/portal', prefixColor: 'blue', env: {} }; @@ -31,6 +31,16 @@ if (DASH_DASH_ARGS.includes('ghost')) { commands = [COMMAND_GHOST, COMMAND_ADMIN]; } +if (DASH_DASH_ARGS.includes('portal')) { + commands.push({ + name: 'portal', + command: 'yarn dev', + cwd: path.resolve(__dirname, '../ghost/portal'), + prefixColor: 'magenta' + }); + COMMAND_GHOST.env['portal__url'] = 'http://localhost:5368/umd/portal.min.js'; +} + if (!commands.length) { console.log(`No commands provided`); process.exit(0);