mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
cleanup startup logs (#291)
This commit is contained in:
parent
731251172e
commit
c60131fdb4
5 changed files with 0 additions and 17 deletions
|
@ -193,8 +193,6 @@ function processMetadata(file) {
|
||||||
|
|
||||||
// process metadata for all docs and save into core/metadata.js
|
// process metadata for all docs and save into core/metadata.js
|
||||||
function generateMetadataDocs() {
|
function generateMetadataDocs() {
|
||||||
console.log('Generating Metadata for Docs....');
|
|
||||||
|
|
||||||
let order;
|
let order;
|
||||||
try {
|
try {
|
||||||
order = readSidebar();
|
order = readSidebar();
|
||||||
|
@ -346,13 +344,6 @@ function generateMetadataBlog() {
|
||||||
const metadatas = [];
|
const metadatas = [];
|
||||||
|
|
||||||
let files = glob.sync(CWD + '/blog/**/*.*');
|
let files = glob.sync(CWD + '/blog/**/*.*');
|
||||||
if (!files || files.length == 0) {
|
|
||||||
console.error(
|
|
||||||
`${chalk.yellow(
|
|
||||||
CWD + '/blog/ appears to be empty'
|
|
||||||
)} Make sure you've put your blog files in your Docusaurus 'website' folder.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
files
|
files
|
||||||
.sort()
|
.sort()
|
||||||
.reverse()
|
.reverse()
|
||||||
|
|
|
@ -122,8 +122,6 @@ function execute(port) {
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
console.log('server.js triggered...');
|
|
||||||
|
|
||||||
reloadMetadata();
|
reloadMetadata();
|
||||||
reloadMetadataBlog();
|
reloadMetadataBlog();
|
||||||
extractTranslations();
|
extractTranslations();
|
||||||
|
@ -525,7 +523,6 @@ function execute(port) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(port);
|
app.listen(port);
|
||||||
console.log('listening on port: ' + port);
|
|
||||||
console.log('Open http://localhost:' + port + '/');
|
console.log('Open http://localhost:' + port + '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,6 @@ const translation = {languages: enabledLanguages};
|
||||||
const files = glob.sync(CWD + '/i18n/**');
|
const files = glob.sync(CWD + '/i18n/**');
|
||||||
const langRegex = /\/i18n\/(.*)\.json$/;
|
const langRegex = /\/i18n\/(.*)\.json$/;
|
||||||
|
|
||||||
console.log('Loading translation files...');
|
|
||||||
|
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
const extension = path.extname(file);
|
const extension = path.extname(file);
|
||||||
if (extension === '.json') {
|
if (extension === '.json') {
|
||||||
|
|
|
@ -35,7 +35,6 @@ program.option('--port <number>', 'Specify port number').parse(process.argv);
|
||||||
|
|
||||||
const port = parseInt(program.port, 10) || 3000;
|
const port = parseInt(program.port, 10) || 3000;
|
||||||
|
|
||||||
console.log('Checking if port ' + port + ' is free...');
|
|
||||||
tcpPortUsed.check(port, 'localhost').then(function(inUse) {
|
tcpPortUsed.check(port, 'localhost').then(function(inUse) {
|
||||||
if (inUse) {
|
if (inUse) {
|
||||||
console.error(chalk.red('Port ' + port + ' is in use'));
|
console.error(chalk.red('Port ' + port + ' is in use'));
|
||||||
|
|
|
@ -36,8 +36,6 @@ function writeFileAndCreateFolder(file, content) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function execute() {
|
function execute() {
|
||||||
console.log('Extracting translateable strings from files...');
|
|
||||||
|
|
||||||
let translations = {
|
let translations = {
|
||||||
'localized-strings': {
|
'localized-strings': {
|
||||||
next: 'Next',
|
next: 'Next',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue