mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
28b11e6fed
refs: https://github.com/TryGhost/Toolbox/issues/440 New command to generate demo data, creates data for over 20 tables in Ghost, suitable for testing most features of the dashboard, as well as making guided product tours using newsletters, tiers, many posts and tags. Usage: `yarn start generate-data` Optionally, keep your existing posts / tags with: `yarn start generate-data --use-existing-tags --use-existing-posts`
28 lines
653 B
JavaScript
28 lines
653 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':
|
|
case 'generate-data':
|
|
command.run(mode);
|
|
break;
|
|
default:
|
|
// New boot sequence
|
|
require('./core/boot')();
|
|
}
|