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
This commit is contained in:
Daniel Lockyer 2022-10-05 11:51:06 +07:00
parent 2c2ee81adb
commit ab99109bbf
No known key found for this signature in database

12
.github/dev.js vendored
View File

@ -10,7 +10,7 @@ let commands = [];
const COMMAND_GHOST = { const COMMAND_GHOST = {
name: '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', prefixColor: 'blue',
env: {} env: {}
}; };
@ -31,6 +31,16 @@ if (DASH_DASH_ARGS.includes('ghost')) {
commands = [COMMAND_GHOST, COMMAND_ADMIN]; 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) { if (!commands.length) {
console.log(`No commands provided`); console.log(`No commands provided`);
process.exit(0); process.exit(0);