Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scully/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"codelyzer": "^5.1.2",
"express": "^4.17.1",
"front-matter": "^3.0.2",
"fs-extra": "^8.1.0",
"guess-parser": "^0.4.11",
"jsonc": "2.0.0",
"marked": "^0.7.0",
Expand Down
9 changes: 5 additions & 4 deletions scully/utils/validateConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {existsSync} from 'fs';
import {join} from 'path';
import {configValidator, plugins} from '../pluginManagement/pluginRepository';
import {angularRoot} from './config';
import {RouteTypes, ScullyConfig} from './interfacesandenums';
import {log, logError, logWarn, yellow} from './log';
import {ScullyConfig} from './interfacesandenums';
import {logError, logWarn, yellow} from './log';

// TODO: make sure all route options are validated.
let hasErrors = false;
Expand All @@ -23,7 +23,8 @@ export async function validateConfig(config: ScullyConfig) {
}
result.projectRoot = config.projectRoot;
} else {
error(`projectRoot missing in "${yellow('scully.json')}"`);
// TODO define a constant for the config file name string
error(`projectRoot missing in "${yellow('scully.config.js')}"`);
}
if (config.routes) {
await Promise.all(
Expand Down Expand Up @@ -53,7 +54,7 @@ export async function validateConfig(config: ScullyConfig) {
logWarn('No routes defined in "scully.config"');
}
if (hasErrors) {
/** stop everthing if there are errors in the config. */
/** stop everything if there are errors in the config. */
process.exit(0);
}
return result as ScullyConfig;
Expand Down