-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cli framework choice #4184
Merged
Merged
Cli framework choice #4184
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d20e1b3
Add CLI flag to choose SB framework to install
Keraito d60900f
Remove manual HTML CLI flag
Keraito 332cbbf
Update command for html sb
Keraito 355dae2
Prompt type inquirer when no project type is detected
Keraito a9ddc7e
Make manual inquirer check more descripti e
Keraito 2506564
Rewrite inquire promises for comprehensibility
Keraito d372b7e
Merge branch 'master' into cli-framework-choice
Keraito c018d98
Change Undetected project feedback
Keraito 2f5a249
Extract supported frameworks and test
Keraito 79d316a
Test installed storybook checker
Keraito 6c1a627
Merge branch 'master' into cli-framework-choice
Keraito 92c98a0
Merge branch 'master' into cli-framework-choice
Keraito 59c40d3
Merge branch 'master' into cli-framework-choice
shilman cba68c4
Add missing project types
shilman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { isStorybookInstalled } from './detect'; | ||
import { supportedFrameworks } from './project_types'; | ||
|
||
describe('isStorybookInstalled should return', () => { | ||
it('false if empty devDependency', () => { | ||
expect(isStorybookInstalled({ devDependencies: {} }, false)).toBe(false); | ||
}); | ||
it('false if no devDependency', () => { | ||
expect(isStorybookInstalled({}, false)).toBe(false); | ||
}); | ||
|
||
supportedFrameworks.forEach(framework => { | ||
it(`true if devDependencies has ${framework} Storybook version`, () => { | ||
const devDependencies = {}; | ||
devDependencies[`@storybook/${framework}`] = '4.0.0-alpha.21'; | ||
expect(isStorybookInstalled({ devDependencies }, false)).toBeTruthy(); | ||
}); | ||
}); | ||
|
||
it('true if forced flag', () => { | ||
expect( | ||
isStorybookInstalled({ | ||
devDependencies: { 'storybook/react': '4.0.0-alpha.21' }, | ||
}) | ||
).toBe(false); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { installableProjectTypes, supportedFrameworks } from './project_types'; | ||
|
||
describe('installableProjectTypes should have an entry for the supported framework', () => { | ||
supportedFrameworks.forEach(framework => { | ||
it(`${framework}`, () => { | ||
expect(installableProjectTypes.includes(framework.replace(/-/g, '_'))).toBe(true); | ||
}); | ||
}); | ||
}); |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm I just extracted this array to another file. Ember support wasn't present yet when I made this PR, but marko en meteor def should have been. I don't see them in the removed code either tho 😱 will add them I'm a few hours