-
-
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.
detect empty projects and provide an error message for users
Additionally, improve the base generator when it comes to detecting builders
- Loading branch information
Showing
10 changed files
with
149 additions
and
60 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
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