CHAPTER 4

image

Using Pub and dart2js to Compile Applications to JavaScript

You’ve already created your first Dart application, you used the sample content that Dart Editor loads by default, and you have added new features. You added color every time you clicked on the paragraph element.

Your application runs perfectly in Dartium, but you want everyone to enjoy it. It’s time to talk about the Dart to JavaScript code compilation.

Currently. only Dartium can run Dart applications because it’s the only web browser that has the Dart Virtual Machine (Dart VM) included. In the future Dart will run natively on other browsers. Soon Dart applications can run ...

Get Web Programming with Dart now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.