-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23874 from storybookjs/yann/improve-empty-dir-ini…
…t-message CLI: Provide guidance for users who try to initialize Storybook on an empty dir
- Loading branch information
Showing
13 changed files
with
207 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import { CoreBuilder } from '../../project_types'; | ||
import { baseGenerator } from '../baseGenerator'; | ||
import type { Generator } from '../types'; | ||
|
||
const generator: Generator = async (packageManager, npmOptions, options) => { | ||
await baseGenerator(packageManager, npmOptions, options, 'ember', { | ||
extraPackages: [ | ||
// babel-plugin-ember-modules-api-polyfill is a peerDep of @storybook/ember | ||
'babel-plugin-ember-modules-api-polyfill', | ||
// babel-plugin-htmlbars-inline-precompile is a peerDep of @storybook/ember | ||
'babel-plugin-htmlbars-inline-precompile', | ||
], | ||
staticDir: 'dist', | ||
}); | ||
await baseGenerator( | ||
packageManager, | ||
npmOptions, | ||
{ ...options, builder: CoreBuilder.Webpack5 }, | ||
'ember', | ||
{ | ||
extraPackages: [ | ||
// babel-plugin-ember-modules-api-polyfill is a peerDep of @storybook/ember | ||
'babel-plugin-ember-modules-api-polyfill', | ||
// babel-plugin-htmlbars-inline-precompile is a peerDep of @storybook/ember | ||
'babel-plugin-htmlbars-inline-precompile', | ||
], | ||
staticDir: 'dist', | ||
} | ||
); | ||
}; | ||
|
||
export default generator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
import { CoreBuilder } from '../../project_types'; | ||
import { baseGenerator } from '../baseGenerator'; | ||
import type { Generator } from '../types'; | ||
|
||
const generator: Generator = async (packageManager, npmOptions, options) => { | ||
await baseGenerator(packageManager, npmOptions, options, 'server', { | ||
extensions: ['json', 'yaml', 'yml'], | ||
}); | ||
await baseGenerator( | ||
packageManager, | ||
npmOptions, | ||
{ ...options, builder: CoreBuilder.Vite }, | ||
'server', | ||
{ | ||
extensions: ['json', 'yaml', 'yml'], | ||
} | ||
); | ||
}; | ||
|
||
export default generator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
import { CoreBuilder } from '../../project_types'; | ||
import { baseGenerator } from '../baseGenerator'; | ||
import type { Generator } from '../types'; | ||
|
||
const generator: Generator = async (packageManager, npmOptions, options) => { | ||
await baseGenerator(packageManager, npmOptions, options, 'solid', {}, 'solid'); | ||
await baseGenerator( | ||
packageManager, | ||
npmOptions, | ||
{ ...options, builder: CoreBuilder.Vite }, | ||
'solid', | ||
{}, | ||
'solid' | ||
); | ||
}; | ||
|
||
export default generator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
import { CoreBuilder } from '../../project_types'; | ||
import { baseGenerator } from '../baseGenerator'; | ||
import type { Generator } from '../types'; | ||
|
||
const generator: Generator = async (packageManager, npmOptions, options) => { | ||
await baseGenerator(packageManager, npmOptions, options, 'svelte', undefined, 'sveltekit'); | ||
await baseGenerator( | ||
packageManager, | ||
npmOptions, | ||
{ ...options, builder: CoreBuilder.Vite }, | ||
'svelte', | ||
undefined, | ||
'sveltekit' | ||
); | ||
}; | ||
|
||
export default generator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.