Merge pull request #10623 from storybookjs/feature/add-svelte-detection-cli

CLI: Add automatic detection for svelte
This commit is contained in:
Michael Shilman 2020-05-02 21:48:58 +08:00 committed by GitHub
commit 21e1fac11f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -184,6 +184,16 @@ const MOCK_FRAMEWORK_FILES = [
},
},
},
{
name: PROJECT_TYPES.SVELTE,
files: {
'package.json': {
dependencies: {
svelte: '1.0.0',
},
},
},
},
{
name: PROJECT_TYPES.RAX,
files: {

View File

@ -185,6 +185,13 @@ export const supportedTemplates = [
return dependencies.every(Boolean);
},
},
{
preset: PROJECT_TYPES.SVELTE,
dependencies: ['svelte'],
matcherFunction: ({ dependencies }) => {
return dependencies.every(Boolean);
},
},
{
preset: PROJECT_TYPES.RAX,
dependencies: ['rax'],