Skip to content

Commit 2db725f

Browse files
SplaktarSanderElias
authored andcommitted
fix(cli): fs_extra_1.pathExists is not a function (#32)
- rename config file in error message to 'scully.config.js' Fixes #28
1 parent 2b059a4 commit 2db725f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

scully/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"codelyzer": "^5.1.2",
3232
"express": "^4.17.1",
3333
"front-matter": "^3.0.2",
34+
"fs-extra": "^8.1.0",
3435
"guess-parser": "^0.4.11",
3536
"jsonc": "2.0.0",
3637
"marked": "^0.7.0",

scully/utils/validateConfig.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import {existsSync} from 'fs';
22
import {join} from 'path';
33
import {configValidator, plugins} from '../pluginManagement/pluginRepository';
44
import {angularRoot} from './config';
5-
import {RouteTypes, ScullyConfig} from './interfacesandenums';
6-
import {log, logError, logWarn, yellow} from './log';
5+
import {ScullyConfig} from './interfacesandenums';
6+
import {logError, logWarn, yellow} from './log';
77

88
// TODO: make sure all route options are validated.
99
let hasErrors = false;
@@ -23,7 +23,8 @@ export async function validateConfig(config: ScullyConfig) {
2323
}
2424
result.projectRoot = config.projectRoot;
2525
} else {
26-
error(`projectRoot missing in "${yellow('scully.json')}"`);
26+
// TODO define a constant for the config file name string
27+
error(`projectRoot missing in "${yellow('scully.config.js')}"`);
2728
}
2829
if (config.routes) {
2930
await Promise.all(
@@ -53,7 +54,7 @@ export async function validateConfig(config: ScullyConfig) {
5354
logWarn('No routes defined in "scully.config"');
5455
}
5556
if (hasErrors) {
56-
/** stop everthing if there are errors in the config. */
57+
/** stop everything if there are errors in the config. */
5758
process.exit(0);
5859
}
5960
return result as ScullyConfig;

0 commit comments

Comments
 (0)