Re: [web-ui] how to best use pub serve

67 views
Skip to first unread message

John Messerly

unread,
Nov 21, 2013, 3:15:59 PM11/21/13
to w...@dartlang.org
On Thu, Nov 21, 2013 at 1:08 AM, Günter Zöchbauer <gzo...@gmail.com> wrote:
What is the intended/best way to use pub serve.
Does run as JavaScript from the editor use pub serve?

I got the advice to use pub serve instead of pub build for active development
but 'run as JavaScript' is only available in the build directory so I have to use pub build first, don't I?

I think you'd have to run "pub serve" from the command line. I haven't noticed any Editor integration.

Seth Ladd

unread,
Nov 21, 2013, 3:18:02 PM11/21/13
to John Messerly, w...@dartlang.org, Kathy Walrath
I found these docs: http://pub.dartlang.org/doc/pub-serve.html  Let us know if something is missing. Thanks!


--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.

Bob Nystrom

unread,
Nov 21, 2013, 4:01:21 PM11/21/13
to Keerti Parthasarathy, web

+keerti

On Thu, Nov 21, 2013 at 1:08 AM, Günter Zöchbauer <gzo...@gmail.com> wrote:
What is the intended/best way to use pub serve.

From the command line:

$ pub serve
 
Does run as JavaScript from the editor use pub serve?

Not yet. You can get to it from the Editor, but it's hidden behind an experimental setting, I think. Keerti knows more about this.

Pub serve is quite new and we didn't want users at 1.0 to all beat on it and run into issues. As it gets more stable, we'll be making it more prominent in the Editor.
 
I got the advice to use pub serve instead of pub build for active development
but 'run as JavaScript' is only available in the build directory so I have to use pub build first, don't I?

Nope. Pub serve will compile to JS on the fly every time you change your Dart code.

Let me know if you run into any problems. :)

Cheers!

- bob

Paul Brauner

unread,
Nov 21, 2013, 5:42:11 PM11/21/13
to Bob Nystrom, Keerti Parthasarathy, web
On Thu, Nov 21, 2013 at 10:01 PM, Bob Nystrom <rnys...@google.com> wrote:

+keerti

On Thu, Nov 21, 2013 at 1:08 AM, Günter Zöchbauer <gzo...@gmail.com> wrote:
What is the intended/best way to use pub serve.

From the command line:

$ pub serve
 
Does run as JavaScript from the editor use pub serve?

Not yet. You can get to it from the Editor, but it's hidden behind an experimental setting, I think. Keerti knows more about this.

Pub serve is quite new and we didn't want users at 1.0 to all beat on it and run into issues. As it gets more stable, we'll be making it more prominent in the Editor.
 

I was surprised by "more prominent", shouldn't it replace the "javascript mode" of the editor altogether eventually?
 
I got the advice to use pub serve instead of pub build for active development
but 'run as JavaScript' is only available in the build directory so I have to use pub build first, don't I?

Nope. Pub serve will compile to JS on the fly every time you change your Dart code.

Let me know if you run into any problems. :)

Cheers!

- bob

--

Keerti Parthasarathy

unread,
Nov 21, 2013, 6:18:22 PM11/21/13
to Paul Brauner, Bob Nystrom, web
You can try out the pub serve launch from the editor. Here's how: 

- create a .options file in your editor install directory with the following content

com.google.dart.tools.core/experimental=true
com.google.dart.tools.core/experimental/pubserve=true

- launch the editor from command line 

DartEditor -debug /path to editor install dir/.options

- Now in the editor if you go to Run > Manage Launches Dialog, you should see a new launch configuration type - launch in Dartium using pub serve.




--
Keerti

gzoechi

unread,
Nov 22, 2013, 2:57:43 AM11/22/13
to w...@dartlang.org, Paul Brauner, Bob Nystrom, kee...@google.com
Works.
Thank you Keerti for this information, this helps a lot.
I'm pretty confident that I already tried pub serve launch in one of the previous Dart releases and wondered where it went.

Günter
Reply all
Reply to author
Forward
0 new messages