mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 03:21:07 +08:00
fix: rename baseGenerator
This commit is contained in:
parent
369c343597
commit
3b6a06aaa1
@ -1 +1 @@
|
||||
export const version = '6.0.0-beta.24';
|
||||
export const version = '6.0.0-beta.25';
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
getAngularAppTsConfigPath,
|
||||
} from './angular-helpers';
|
||||
import { writeFileAsJson, copyTemplate } from '../../helpers';
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
function editAngularAppTsConfig() {
|
||||
const tsConfigJson = getAngularAppTsConfigJson();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { writeFileAsJson, readFileAsJson, copyTemplate } from '../../helpers';
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
function addStorybookExcludeGlobToTsConfig() {
|
||||
const tsConfigJson = readFileAsJson('tsconfig.json', true);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
baseGenerator(packageManager, npmOptions, options, 'ember', {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
import { StoryFormat } from '../../project_types';
|
||||
import { copyTemplate } from '../../helpers';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
await baseGenerator(packageManager, npmOptions, options, 'marionette');
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
await baseGenerator(packageManager, npmOptions, options, 'marko');
|
||||
|
@ -1,6 +1,6 @@
|
||||
import fs from 'fs';
|
||||
import JSON5 from 'json5';
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
baseGenerator(packageManager, npmOptions, options, 'react', {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
baseGenerator(packageManager, npmOptions, options, 'mithril');
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
baseGenerator(packageManager, npmOptions, options, 'preact');
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
import { writePackageJson } from '../../js-package-manager';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
import { StoryFormat } from '../../project_types';
|
||||
import { copyTemplate } from '../../helpers';
|
||||
|
||||
|
@ -2,7 +2,7 @@ import shell from 'shelljs';
|
||||
import chalk from 'chalk';
|
||||
import { paddedLog, copyTemplate } from '../../helpers';
|
||||
import { NpmOptions } from '../../NpmOptions';
|
||||
import { baseGenerator, GeneratorOptions } from '../generator';
|
||||
import { baseGenerator, GeneratorOptions } from '../baseGenerator';
|
||||
import { JsPackageManager } from '../../js-package-manager';
|
||||
|
||||
const generator = async (
|
||||
|
@ -1,7 +1,7 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
import { copyTemplate } from '../../helpers';
|
||||
import { StoryFormat } from '../../project_types';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
baseGenerator(packageManager, npmOptions, options, 'riot', {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
import { StoryFormat } from '../../project_types';
|
||||
import { copyTemplate } from '../../helpers';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
baseGenerator(packageManager, npmOptions, options, 'svelte', {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
import { StoryFormat } from '../../project_types';
|
||||
import { copyTemplate } from '../../helpers';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
import { copyTemplate } from '../../helpers';
|
||||
|
||||
const generator: Generator = async (packageManager, npmOptions, options) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { baseGenerator, Generator } from '../generator';
|
||||
import { baseGenerator, Generator } from '../baseGenerator';
|
||||
import { StoryFormat } from '../../project_types';
|
||||
import { copyTemplate } from '../../helpers';
|
||||
|
||||
|
@ -67,13 +67,18 @@ export async function baseGenerator(
|
||||
...addonsPeerDeps,
|
||||
].filter(Boolean);
|
||||
const versionedPackages = await packageManager.getVersionedPackages(...packages);
|
||||
console.log('versionedPackages', versionedPackages);
|
||||
|
||||
configure([...addons, ...extraAddons]);
|
||||
if (addComponents) {
|
||||
copyComponents(framework, language);
|
||||
}
|
||||
|
||||
const packageJson = packageManager.retrievePackageJson();
|
||||
const babelDependencies = await getBabelDependencies(packageManager, packageJson);
|
||||
packageManager.addDependencies({ ...npmOptions, packageJson }, [
|
||||
...versionedPackages,
|
||||
...babelDependencies,
|
||||
]);
|
||||
|
||||
if (addScripts) {
|
||||
packageManager.addStorybookCommandInScripts({
|
||||
@ -81,9 +86,4 @@ export async function baseGenerator(
|
||||
staticFolder: staticDir,
|
||||
});
|
||||
}
|
||||
const babelDependencies = await getBabelDependencies(packageManager, packageJson);
|
||||
packageManager.addDependencies({ ...npmOptions, packageJson }, [
|
||||
...versionedPackages,
|
||||
...babelDependencies,
|
||||
]);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user