News for hackers. Stuff that matters.
Re:Angular Announces AngularDart by Max_Horstmann on Tuesday November 05, 2013 @04:37PM (#6678530)
I like both Angular and Dart, so that's good news.

One thing I noticed though: transpiling a .dart file with just the import statement for AngularDart (import 'package:angular/angular.dart') generates a non-minified 5MB .js file with almost 150 kloc. Every code change will create a new version of it, invalidating previously cached versions. :/

Re:Angular Announces AngularDart by floitsch on Tuesday November 05, 2013 @04:56PM (#6678682)
Are you sure you are using the latest version? Angular was an early user of mirrors (reflection) which (more or less) disabled the tree-shaking of dart2js. This was recently improved.

Tracking the size of AngularDart: https://github.com/jbdeboer/angular-dart-js-size

Re:Angular Announces AngularDart by Max_Horstmann on Tuesday November 05, 2013 @05:27PM (#6678905)
Maybe I'm missing something, but yes, I think so. Dart version 0.8.10.3_r29803.

pubspec.yaml:

name: test1 dependencies: browser: any angular: git: https://github.com/angular/angular.dart.git

test1.dart:

import 'package:angular/angular.dart'; main() => ngBootstrap();

dart2js launch => builds test1.dart.js, about 5MB, 142,749 loc.

Re:Angular Announces AngularDart by jbdeboer on Tuesday November 05, 2013 @05:51PM (#6679055)
Yes. You need to add a @MirrorsUsed annotation in your main.dart file. See https://github.com/jbdeboer/angular-dart-js-size/blob/master... for our current best practices.

You should get ~173KB gzipped, minified dart2js output.

Re:Angular Announces AngularDart by Max_Horstmann on Tuesday November 05, 2013 @06:06PM (#6679146)
Beautiful. Thanks!
Re:Angular Announces AngularDart by lennel on Wednesday November 06, 2013 @01:44AM (#6681192)
So are you using that the full tree shaking algo works with angular now?
Re:Angular Announces AngularDart by spankalee on Tuesday November 05, 2013 @05:19PM (#6678840)
There's still a lot of work to be done on code size when using reflection, and teams at Google are definitely interested in incremental updates to cached apps, so that will be worked on too. It's still very early in Dart's lifetime.