-
Notifications
You must be signed in to change notification settings - Fork 352
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
Dev: Add "framework" option #826
Conversation
Can we get a review on this soon please. |
@@ -577,7 +528,7 @@ DevCommand.flags = { | |||
live: flags.boolean({ | |||
char: 'l', | |||
description: 'Start a public live session' | |||
}) | |||
}), |
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.
Shouldn't Prettier pick up those?
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.
I don't have prettier setup for oncommit
hook, it messes up the staged hunks
for (const i in detectors) { | ||
const detectorResult = detectors[i]() | ||
if (detectorResult) settingsArr.push(detectorResult) | ||
for (const i in detectors) { |
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.
Can also do:
for (const detector of detectors) {
const detectorResult = detector()
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.
Is it compatible with Node 8?
Looking good except some small details! |
- Summary
Add
framework
option fornetlify.toml
dev
section. This allows users to specify#auto
to test all detectors,#static
to run static file server or one of project types which Netlify Dev can detect to run that detector only.This will help with situations where users have multiple detectors testing positive and they always have to choose.
Fixes: #469
Fixes: #706
Fixes: #841
- Test plan
framework = "create-react-app"
or a project types which Netlify Dev can detectnetlify dev
- Description for the changelog
framework
option fornetlify.toml
framework
optiontype
toframework
in detectorsstartProxy
paramserverType
toframework
loadDetector
functionchooseDefaultSettings
function withchooseDefaultArgs
env: { ...process.env }
tosettings
cra
tocreate-react-app
run
from command arguments if command isnpm
- A picture of a cute animal (not mandatory but encouraged)
🦄