Skip to content

Commit

Permalink
fix(cli): fs_extra_1.pathExists is not a function (#32)
Browse files Browse the repository at this point in the history
- rename config file in error message to 'scully.config.js'

Fixes #28
  • Loading branch information
Splaktar authored and SanderElias committed Dec 18, 2019
1 parent 2b059a4 commit 2db725f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit 2db725f

Please sign in to comment.