mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
CLI: RAX template CSF refactor
This commit is contained in:
parent
256556fcc6
commit
038629815b
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user