add a babelrc command

This commit is contained in:
Norbert de Langen 2021-08-27 14:33:42 +02:00
parent 4372cf8618
commit 090c0269ec
No known key found for this signature in database
GPG Key ID: 976651DA156C2825
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,6 @@
import { logger } from '@storybook/node-logger';
export const generateStorybookBabelConfig = async () => {
const cwd = process.cwd();
logger.info(`Generating the storybook default babel config at ${cwd}`);
};

View File

@ -11,6 +11,7 @@ import { extract } from './extract';
import { upgrade } from './upgrade';
import { repro } from './repro';
import { link } from './link';
import { generateStorybookBabelConfig } from './babal-config';
const pkg = sync({ cwd: __dirname }).packageJson;
@ -37,6 +38,11 @@ program
.option('-s --skip-postinstall', 'Skip package specific postinstall config modifications')
.action((addonName, options) => add(addonName, options));
program
.command('babelrc')
.description('generate the default storybook babel config into your current working directory')
.action(() => generateStorybookBabelConfig());
program
.command('upgrade')
.description('Upgrade your Storybook packages to the latest')