Skip to content

Commit

Permalink
feat(config): do not require config file
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Feb 10, 2018
1 parent ae68f98 commit c8cc144
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/sys/node/node-sys.ts
Expand Up @@ -140,12 +140,13 @@ export class NodeSystem implements StencilSystem {
config = configFileData.config;
config.configPath = configPath;

if (!config.rootDir && configPath) {
config.rootDir = path.dirname(configPath);
}

} catch (e) {
throw new Error(`Error reading Stencil configuration file "${configPath}". ` + e);
// no stencil.config.js file, which is fine
config = {};
}

if (!config.rootDir && configPath) {
config.rootDir = path.dirname(configPath);
}

if (!config.sys) {
Expand Down

0 comments on commit c8cc144

Please sign in to comment.