mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
3d989eba23
refs https://github.com/TryGhost/Toolbox/issues/354 - this commit turns the Ghost repo into a monorepo so we can bring our internal packages back in, which makes life easier when working on Ghost
27 lines
631 B
JavaScript
27 lines
631 B
JavaScript
/**
|
|
* Internal CLI Placeholder
|
|
*
|
|
* If we want to add alternative commands, flags, or modify environment vars, it should all go here.
|
|
* Important: This file should not contain any requires, unless we decide to add pretty-cli/commander type tools
|
|
*
|
|
**/
|
|
|
|
// Don't allow NODE_ENV to be null
|
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
|
|
|
const argv = process.argv;
|
|
const mode = argv[2];
|
|
|
|
const command = require('./core/cli/command');
|
|
|
|
// Switch between boot modes
|
|
switch (mode) {
|
|
case 'repl':
|
|
case 'timetravel':
|
|
command.run(mode);
|
|
break;
|
|
default:
|
|
// New boot sequence
|
|
require('./core/boot')();
|
|
}
|