Skip to content

Commit

Permalink
fix: default runtime config
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jun 25, 2020
1 parent 6e9eb71 commit 2684a03
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 52 deletions.
1 change: 1 addition & 0 deletions core/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"license": "MIT",
"dependencies": {
"@component-controls/core": "^1.5.1",
"chalk": "^4.0.0",
"glob": "^7.1.6",
"typescript": "^3.8.3",
"yargs": "^15.3.1"
Expand Down
6 changes: 5 additions & 1 deletion core/config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export const loadConfiguration = (
): ConfigrationResult | undefined => {
const folder = configFolder ?? getConfigurationArg(args);
const configPath = folder ? path.resolve(baseFolder, folder) : baseFolder;
const allFiles = fs.existsSync(configPath) ? fs.readdirSync(configPath) : [];
const hasConfigFolder = fs.existsSync(configPath);
if (!hasConfigFolder) {
console.warn('configuration folder not found', configPath);
}
const allFiles = hasConfigFolder ? fs.readdirSync(configPath) : [];
const buildConfigFile = allFiles.find(file =>
buildConfigFileNames.includes(file.toLowerCase()),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -134,7 +134,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -217,7 +217,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -151,7 +151,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -258,7 +258,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,7 @@ user setting can display only props table or only controls",
"@component-controls/components": "^1.5.1",
"@component-controls/core": "^1.5.1",
"@component-controls/editors": "^1.5.1",
"@component-controls/store": "^1.5.1",
"@component-controls/store": "^1.5.2",
"@primer/octicons-react": "^10.0.0",
"@storybook/csf": "^0.0.1",
"@theme-ui/css": "next",
Expand Down Expand Up @@ -2476,7 +2476,7 @@ user setting can display only props table or only controls",
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
"dd9d92dc79a97d724bc2dff2c5f2aa7a": Object {
"dependencies": Object {
Expand Down Expand Up @@ -2517,7 +2517,7 @@ user setting can display only props table or only controls",
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {},
Expand Down
28 changes: 14 additions & 14 deletions core/instrument/test/__snapshots__/csf-props-usage.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -166,7 +166,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -309,7 +309,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -434,7 +434,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -577,7 +577,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -726,7 +726,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -957,7 +957,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -1067,7 +1067,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -1207,7 +1207,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -1350,7 +1350,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -1501,7 +1501,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -1709,7 +1709,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -1833,7 +1833,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -1991,7 +1991,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down
18 changes: 9 additions & 9 deletions core/instrument/test/__snapshots__/csf-stories.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {},
Expand Down Expand Up @@ -114,7 +114,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -192,7 +192,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {},
Expand Down Expand Up @@ -253,7 +253,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -346,7 +346,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -497,7 +497,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -604,7 +604,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -726,7 +726,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down Expand Up @@ -848,7 +848,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down
8 changes: 4 additions & 4 deletions core/instrument/test/__snapshots__/csf-story-doc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {},
Expand Down Expand Up @@ -128,7 +128,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {},
Expand Down Expand Up @@ -213,7 +213,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {},
Expand Down Expand Up @@ -286,7 +286,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {},
Expand Down
2 changes: 1 addition & 1 deletion core/instrument/test/__snapshots__/csf-toggle.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
},
"stories": Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
}
`;
Expand Down Expand Up @@ -115,7 +115,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
}
`;
Expand Down Expand Up @@ -197,7 +197,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
}
`;
Expand Down Expand Up @@ -365,7 +365,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
}
`;
Expand Down Expand Up @@ -425,7 +425,7 @@ Object {
"docs": "https://github.com/ccontrols/component-controls/tree/master#readme",
"issues": "https://github.com/ccontrols/component-controls/issues",
},
"version": "1.5.1",
"version": "1.5.2",
},
}
`;
Loading

0 comments on commit 2684a03

Please sign in to comment.