Dart Dev Compiler, pub serve, Hello World...

201 views
Skip to first unread message

Danny Tuppeny

unread,
Aug 13, 2016, 6:46:24 AM8/13/16
to Dart Misc
I'm starting to think about how to add support for web apps to Dart Code. I have little experience with Dart web apps nor DDC (I'm aware DDC is still in dev) so I have a lot of questions!

I can't find much info on DDC but I figured maybe there are people on this list using it so maybe I can get some answers!
  • What does a Hello World app look like if you're using DDC? (What's in pubspec? What does the script tag in the HTML file point at?)
  • Will pub serve work nicely with DDC?
  • Can DDC (or pub, or whatever) automatically recompile on changes?
(and there are more questions here)

Danny Tuppeny

unread,
Aug 13, 2016, 6:48:39 AM8/13/16
to Dart Misc
Hmmm, found this (added 15 days ago):


/// Additionally, these commands are being considered
///   * link:  combines several JS modules into a single JS file
///   * build: compiles & links a set of code, automatically determining
///            appropriate groupings of libraries to combine into JS modules
///   * watch: watch a directory and recompile build units automatically
///   * serve: uses `watch` to recompile and exposes a simple static file server
///            for local development

Matan Lurey

unread,
Aug 13, 2016, 11:25:20 PM8/13/16
to Dart Misc
I think the easiest way to start might be the traditional Dartium/dart2js route while the DDC story ramps up. Will that work?

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Danny Tuppeny

unread,
Aug 14, 2016, 3:03:00 AM8/14/16
to Dart Misc
It would probably work, but it seems like wasted effort if DDC is useable. Dartium also adds complications; we have to make sure the user has it, make sure it's launched with --user-data-dir to avoid trashing their Chrome profile. Dart2js doesn't output very debuggable JS (does it even do incremental compiles?)

I guess it depends how far off DDC is being useable; if it's a long way, maybe it'd worth it, but I was under the impression it was working reasonably well?

Matan Lurey

unread,
Aug 14, 2016, 1:47:12 PM8/14/16
to Dart Misc
IMO I'd support Dartium at minimum, even if it has some small complications, because of ease of use and most Dart developers use it today.

DDC is definitely usable, but I don't have a good understanding of the external story yet.

Danny Tuppeny

unread,
Aug 14, 2016, 4:43:30 PM8/14/16
to mi...@dartlang.org
On Sun, 14 Aug 2016 at 18:47 Matan Lurey <ma...@lurey.org> wrote:
IMO I'd support Dartium at minimum, even if it has some small complications, because of ease of use and most Dart developers use it today.

Hmmm, I was actually hoping to avoid it because I don't think "ease of use" is one of its selling points!... User needs to:
  • Download Dartium
  • Extract it somewhere
  • Decide where to put --user-data-dir (if they don't read about this, or I don't tell them, they can trash their Chrome profile)
  • Edit my config to say where Dartium is, where their dartium profile is
  • Open web project
  • Press F5/the "Run" button
The experience I'm going for is:
  • Open web project
  • Press F5/the "Run" button
I really don't want to waste effort on Dartium or Dart2js if they're not the long-term plan. If DDC is usable and I'm building a new tool, it seems like it'd be good for us both if it was supported :-)


DDC is definitely usable, but I don't have a good understanding of the external story yet.

Is there anyone I can poke for a little info? Just a hello world web application and the command(s) to run/rebuild it would be a huge start! :) 

Vijay Menon

unread,
Aug 14, 2016, 6:40:04 PM8/14/16
to General Dart Discussion
DDC is more a low-level compiler than a full-fledged build tool, so it's a little complicated to use right now.  There is no pub integration.  (We've been focusing on integrating with internal build tools.)

I did update the usage doc though:

Danny Tuppeny

unread,
Aug 15, 2016, 1:36:38 AM8/15/16
to General Dart Discussion
Great, I'll have a go and see where I can get. Thanks!
Reply all
Reply to author
Forward
0 new messages