CLI: RAX template CSF refactor

This commit is contained in:
Michael Shilman 2019-10-12 09:36:22 +08:00
parent 256556fcc6
commit 038629815b
7 changed files with 4 additions and 5 deletions

View File

@ -1,14 +1,13 @@
import path from 'path';
import fse from 'fs-extra';
import {
getVersions,
getPackageJson,
writePackageJson,
getBabelDependencies,
installDependencies,
copyTemplate,
} from '../../lib/helpers';
export default async npmOptions => {
export default async (npmOptions, { storyFormat = 'csf' }) => {
const [
storybookVersion,
actionsVersion,
@ -24,7 +23,7 @@ export default async npmOptions => {
'rax'
);
fse.copySync(path.resolve(__dirname, 'template/'), '.', { overwrite: true });
copyTemplate(__dirname, storyFormat);
const packageJson = getPackageJson();

View File

@ -188,7 +188,7 @@ const installStorybook = (projectType, options) => {
.then(end);
case types.RAX:
return raxGenerator(npmOptions)
return raxGenerator(npmOptions, generatorOptions)
.then(commandLog('Adding storybook support to your "Rax" app'))
.then(end);