Discussion  - 
Request for feedback: Try out new 'pub deploy' command. It's still in development, but you can try it with the latest SDK/Editor.

What is it?
'pub deploy' is a new command that creates a deployable directory from your Dart web app.

What does it do?
It creates a new deploy/ dir, copies static files into like (e.g. dart.js), runs dart2js and dart2dart on your app, and creates a deployable directory without symlinks.

How do I use it?
Get the latest Editor/SDK download (Dart Editor version 0.5.9_r22879) and ensure pub is on your PATH. Then, try `pub deploy` from the root of your project.

How do I send feedback?
Bugs or feature requests should go to http://dartbug.com/new. Questions on how to use the command should go to Stack Overflow.

Is it finished or stable?
Nope! Just the beginning. Comments most welcome.

Mark Bennett's profile photoBob Nystrom's profile photoEric Snellman's profile photoSeth Ladd's profile photo
Does it minify as well as tree shake when running dart2dart and dart2js? Are there any known bugs or limitations we should be aware of such as issues with web_ui and it's out directory etc first? (Things I recall hearing about when it was first discussed on the mailing list).
There aren't any known bugs or limitations yet, but we haven't had any one try it out yet. It's still under development, so expect a couple of unpleasant surprises at first. We do have plans to make it more powerful and flexible and we're actively working on it.
Will this eventually support actually deploying e.g xcopy/rsync/ftp the 'packaged' folder to a remote site?
+Demis Bellot Having pub deploy working will allow to create some wrappers, it's not hard to create ftp/rsync script to export changed files.
+Bob Nystrom I actually tried it out yesterday :) I dont think it supported or detected a web-ui project. If it does then I need to double check what I was doing. 
The Dart team is always a step ahead. Thank you
This is great, but does it blend with web_ui?
+Adam Singer Same issue here. I just tried it, and it did not manage to deploy my web_ui project. I ended up with a deploy directory that was only partially populated with my project.

+Bob Nystrom is this by intention, or are there some magic incantations we need to perform to make it fly with web_ui?  :)
It should Just Work (TM), but it's still in development right now, so it may have some rough edges. If you can file a bug or two with details, that will help us get it sorted out. Thanks!
Is pub deploy intended to allow me to include source code from the /lib folder in my project?

import "../lib/example.dart" in a file called "/web/my_app.dart" doesn't seem to be resolving when I do "pub deploy". I'll file a bug if it's meant to work, however it's also complaining in the Dart Editor.
That should work, I think. Maybe use a "package:" import instead?
Hmm, I think I must of had a typo somewhere in the import. I just erased and tried again and now it seems to be working in both. :P
I'm thinking my problems with deploy stem from the fact that my web_ui project currently fails at compiling to JS, which I'd completely forgotten when I wrote my previous comment.

I look forward to trying it, when the dart2js bug has been fixed!  :)
I noticed that I can't deploy apps if they reference local packages in their pubspec.yaml. Given the packages content would be resolved locally at deploy time, is this a bug or is it by design?
That's a bug. Path dependencies should be copied in to your output directory just like any other.
It works with Web UI in a very limited fashion.  My app is 1 html file,1 dart file and I can use templates.  However it breaks when the top level html file imports a html file that then links to web component.  Thus I believe I cannot use web components for they require separate files.  Even If I could put it all in 1 file would it be "tree-shacked" out without a direct invocation from dart code instead of template?  I did not test multiple html files.  Does dart2js just tree-shakes and link everything from that 1 dart file?; do the contents of the html file have no impact on the shaking?  If I "import" a dart file does it just shake that import but not the top level dart script file itself?  The Web UI example that ships with the dart editor "x-click-counter" is not functional with the current pub deploy.
+Eric Snellman thanks for diving in. Care to open a bug for us at http://dartbug.com/new ? That way we'll ensure it doesn't get lost, and you'll get an update when pub deploy works with the sample apps. Thanks!
Add a comment...