mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
Initial changes to error messages
This commit is contained in:
parent
e285f93c1b
commit
b256d2f8d9
7 changed files with 45 additions and 6 deletions
|
@ -11,10 +11,22 @@
|
|||
|
||||
require("babel-register")({
|
||||
babelrc: false,
|
||||
only: [__dirname, process.cwd() + "/core"],
|
||||
only: [__dirname, process.cwd() + "/core"],
|
||||
plugins: [require("./server/translate-plugin.js")],
|
||||
presets: ["react", "latest"]
|
||||
});
|
||||
|
||||
// initial check that required files are present
|
||||
const chalk = require("chalk");
|
||||
const fs = require("fs");
|
||||
const CWD = process.cwd();
|
||||
|
||||
if (!fs.existsSync(CWD + "/siteConfig.js")) {
|
||||
console.error(
|
||||
chalk.red("Error: No siteConfig.js file found in website folder!")
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const generate = require("./server/generate.js");
|
||||
generate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue