Discover angular-cli in the beginning + move "@storybook/core" to deps in storyshots/package.json

This commit is contained in:
igor-dv 2018-04-02 19:14:21 +03:00
parent 74807fd8be
commit 1f83612c2d
2 changed files with 7 additions and 12 deletions

View File

@ -17,6 +17,7 @@
},
"dependencies": {
"@storybook/channels": "4.0.0-alpha.1",
"@storybook/core": "4.0.0-alpha.1",
"@storybook/node-logger": "4.0.0-alpha.1",
"babel-runtime": "^6.26.0",
"glob": "^7.1.2",
@ -37,7 +38,6 @@
},
"peerDependencies": {
"@storybook/addons": "4.0.0-alpha.1",
"@storybook/core": "4.0.0-alpha.1",
"babel-core": "^6.26.0 || ^7.0.0-0"
}
}

View File

@ -9,7 +9,11 @@ import {
applyAngularCliWebpackConfig,
} from './angular-cli_config';
let cliWebpackConfigOptions;
const cliWebpackConfigOptions = getAngularCliWebpackConfigOptions(process.cwd());
if (cliWebpackConfigOptions) {
logger.info('=> Loading angular-cli config.');
}
const configLoader = configLoaderCreator({
defaultConfigName: 'angular-cli',
@ -21,16 +25,7 @@ const configLoader = configLoaderCreator({
return config;
},
wrapDefaultConfig: config => {
// Check whether project has Angular CLI configuration file
cliWebpackConfigOptions = getAngularCliWebpackConfigOptions(process.cwd());
if (cliWebpackConfigOptions) {
logger.info('=> Loading angular-cli config.');
}
return applyAngularCliWebpackConfig(config, cliWebpackConfigOptions);
},
wrapDefaultConfig: config => applyAngularCliWebpackConfig(config, cliWebpackConfigOptions),
wrapBasicConfig: config => applyAngularCliWebpackConfig(config, cliWebpackConfigOptions),
});