fix: rename baseGenerator

This commit is contained in:
tooppaaa 2020-06-12 00:28:37 +02:00
parent 369c343597
commit 3b6a06aaa1
21 changed files with 26 additions and 26 deletions

View File

@ -1 +1 @@
export const version = '6.0.0-beta.24';
export const version = '6.0.0-beta.25';

View File

@ -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();

View File

@ -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);

View File

@ -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', {

View File

@ -1,4 +1,4 @@
import { baseGenerator, Generator } from '../generator';
import { baseGenerator, Generator } from '../baseGenerator';
import { StoryFormat } from '../../project_types';
import { copyTemplate } from '../../helpers';

View File

@ -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');

View File

@ -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');

View File

@ -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', {

View File

@ -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');

View File

@ -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');

View File

@ -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) => {

View File

@ -1,4 +1,4 @@
import { baseGenerator, Generator } from '../generator';
import { baseGenerator, Generator } from '../baseGenerator';
import { StoryFormat } from '../../project_types';
import { copyTemplate } from '../../helpers';

View File

@ -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 (

View File

@ -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';

View File

@ -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', {

View File

@ -1,4 +1,4 @@
import { baseGenerator, Generator } from '../generator';
import { baseGenerator, Generator } from '../baseGenerator';
import { StoryFormat } from '../../project_types';
import { copyTemplate } from '../../helpers';

View File

@ -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', {

View File

@ -1,4 +1,4 @@
import { baseGenerator, Generator } from '../generator';
import { baseGenerator, Generator } from '../baseGenerator';
import { StoryFormat } from '../../project_types';
import { copyTemplate } from '../../helpers';

View File

@ -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) => {

View File

@ -1,4 +1,4 @@
import { baseGenerator, Generator } from '../generator';
import { baseGenerator, Generator } from '../baseGenerator';
import { StoryFormat } from '../../project_types';
import { copyTemplate } from '../../helpers';

View File

@ -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,
]);
}