Open core-ai-bot opened 3 years ago
Comment by dangoor Wednesday Feb 12, 2014 at 14:34 GMT
I can imagine the ChildProcess module being really popular with extension authors...
This change is going to be very cool. Even if we don't deal with the UI questions initially, I think it would be great to get this in. I need to investigate some refactoring of the browser launching part of live development (a layer that goes between LiveDevelopment.js and NativeApp.js), and I will do that with this branch as a starting point so that I can play with it. I'll see if I can figure out the best way to handle the prefs.
Comment by dangoor Wednesday Feb 12, 2014 at 16:25 GMT
I think browser definitions is one of those things that doesn't need to be a preference. It would be fine to just have an API allowing extension authors to define new browsers.
It would make sense for the default browser to be a preference (likely just a string preference with an ID for the browser like "chrome" or "chrome-canary"). I could imagine someone having a different default browser for different projects (depending on customer requirements, for example), especially once we support live preview in more browsers.
How does that strike you?
Comment by jasonsanjose Monday May 19, 2014 at 17:58 GMT
@
njx: Are@
busykai and friends working on a similar mechanism already? If so, can I close this experimental PR and delete the branch?
Comment by busykai Monday May 19, 2014 at 18:12 GMT
@
jasonsanjose yes, a similar mechanism is included into@
njx's CDT-less prototype of Live Preview. I've passed the pointer to this and to@
dangoor's dangoor/liveapi-sketch branch to@
shahabl who's working on productizing the prototype to make sure all this work is taken advantage of.
Comment by jasonsanjose Monday May 19, 2014 at 18:20 GMT
Ok. I'll keep this PR open for now just as a flag to keep the branch. Just send me a comment when it's ok to clean up and delete this branch. Thanks!
Comment by dangoor Monday May 19, 2014 at 19:33 GMT
I like the ChildProcess stuff in here, even if the browser launching is likely not quite where we'd end up. It seems like the ability to run a child process conveniently from client side code like this would save some people from having to do their own node domains...
Comment by dangoor Wednesday May 21, 2014 at 14:17 GMT
Ahh, actually ChildProcess is not more generally useful at this stage because it doesn't allow the client to work with stdin/stdout, so that alone shouldn't keep this one going after@
shahabl is done with his work.
Comment by dangoor Wednesday Nov 19, 2014 at 15:10 GMT
We're cleaning up the old pull requests, so I'm going to go ahead and close this one now.
Comment by busykai Wednesday Nov 26, 2014 at 00:34 GMT
@
dangoor,@
jasonsanjose I think we would want to use a launching mechanism based on or similar to this one (I, personally, like how it's done) + UI for configuration instead of attempting to located installed browsers which may become hairy as we, in XDK, found out...
Issue by jasonsanjose Thursday Jan 23, 2014 at 20:22 GMT Originally opened as https://github.com/adobe/brackets/pull/6622
This is a REALLY early prototype for allowing users to specify their own path to Chrome/Chromium and maybe even Firefox, for use with live preview.
TODO clean up Firefox instructions
To get FirefoxAurora working:
file:///Applications/Brackets.app/Contents/dev/src/LiveDevelopment/launch.html
I could only get live HTML to work, but not live CSS.
To use Chrome Canary:
isDefault
flag https://github.com/adobe/brackets/pull/6622/files#diff-c9d3abef7253cef9bb29540cd3bd87faR78isDefault
settingsLaunching
brackets.app.openLiveBrowser
andbrackets.app.closeLiveBrowser
with a node domain that useschild_process
to execute programs from nodePreferences
user
scope for easier access@
dangooruser
scope prefs if they already existUI
isDefault
flagPopulate default browsers at first launch
REG
to find path tochrome.exe
mdfind "kMDItemCFBundleIdentifier == 'com.google.Chrome'"
to find Chromecodesign --display /Applications/Google\ Chrome.app
to get to binary in app bundle$PATH
?Code cleanup
ChildProcess
API match nodechild_process
jasonsanjose included the following code: https://github.com/adobe/brackets/pull/6622/commits