Skip to content
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

"pub serve" + "pub run" integration #17

Open
DanTup opened this issue Jul 4, 2014 · 0 comments
Open

"pub serve" + "pub run" integration #17

DanTup opened this issue Jul 4, 2014 · 0 comments

Comments

@DanTup
Copy link
Contributor

DanTup commented Jul 4, 2014

pub serve and pub run are used for launching web and/or command line apps. These are the commands that make most sense to be bound to F5.

[ ] Allow user to set startup object
[ ] If the "startup item" is set to something in the web folder, use pub serve
[ ] If the "startup item" is set to an html file in the test folder, use pub serve test
[ ] If the "startup item" is set to a dart file, then pub run should be used
[ ] Allow the user to set browser to use for pub serve, including Dartium user-data-dir

pub serve

  1. Execute pub serve from the project root (if it is not already running)
  2. Launch the default browser for the pub site (localhost:8080/ *) with the startup file tagged on the end
  3. A port number can be provided, which might be best, to avoid clashes with multiple projects open

pub serve should be run like IIS Express; the process should be kept live, even if the user closes the browser and is not debugging; as the development cycle will involve changing files in VS, alt+tabing back to the browser and hitting refresh. Unlike IIS Express, there is no systray icon or any indication for the user that it's running; so we must stop the process on exist/project unload, and seamlessly reuse the process if it's already running and the user hits F5.

pub serve test

This is the same as pub serve but points at the test folder; allowing tests to be executed in the browser.

pub run

  1. Execute pub run {path to file} from the project root

pub run executes the provided Dart script, but will automatically restore packages, run transformers (etc.) before running. Although we could instead use dart.exe {path to file} I think using pub would be more user-friendly, as if the user has opened a project they've cloned from the web, they wouldn't need to remember to run pub get first.

@DanTup DanTup added this to the 1.5 milestone Jul 4, 2014
@DanTup DanTup changed the title Add an option to execute "pub get" and other useful pub commands Implement "pub get", "pub serve", "pub build" etc. Jul 7, 2014
@DanTup DanTup mentioned this issue Oct 15, 2014
4 tasks
@DanTup DanTup changed the title Implement "pub get", "pub serve", "pub build" etc. pub serve + pub run integration Oct 15, 2014
@DanTup DanTup changed the title pub serve + pub run integration "pub serve" + "pub run" integration Oct 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant