dart-archive / core-elements

Polymer core-* elements wrapped or ported for Dart
https://pub.dartlang.org/packages/core_elements
Apache License 2.0
33 stars 25 forks source link

Investigate minification of js/css/html during deployment #181

Open jakemac53 opened 9 years ago

jakemac53 commented 9 years ago

Mangling names would be hard due to the js-interop, but we should be able to save a lot of space by just removing comments and collapsing whitespace. We should do this for html/css/js

jakemac53 commented 9 years ago

Whatever solution we use here should also be applied to https://github.com/dart-lang/paper-elements

Andersmholmgren commented 9 years ago

Be nice if there is any way to apply tree shaking to the elements. Remove unused elements etc

jakemac53 commented 9 years ago

I agree, but we can't really do that until we have global transformers (see http://dartbug.com/17306). The application is the only thing that knows what it could delete, but it can't delete files in this package.

zoechi commented 9 years ago

Shouldn't it be possible to just run vulcanize or some other JavaScript minification after pub build to achive this?

jakemac53 commented 9 years ago

Yes, but it would be nice if we could integrate that into the transformation process, eliminating any extra steps and standardizing how its done.