Book Image

DART Cookbook

By : Ivo Balbaert
Book Image

DART Cookbook

By: Ivo Balbaert

Overview of this book

Table of Contents (18 chapters)
Dart Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Publishing and deploying your app


There comes a point in time where you consider your app to be production ready, and you are eager to hand it over to your clients or users. If it is a web app in the Dart world at this moment in time, this means compiling to JavaScript. Luckily, the pub tool will take care of this stage in your app's life, so that your app can be deployed successfully.

Getting ready

This is pretty straightforward. To prepare, you need to run and test your application in both the checked and production modes.

How to do it...

Run the pub build command (see the Compiling your app to JavaScript recipe in Chapter 1, Working with Dart Tools), either from the command line or in Dart Editor. This creates the build folder with the subfolder bin or web, respectively, for a command-line or web application. The build folder contains complete deliverable files. The files generated in there can be deployed like any static content. Upload the JavaScript files together with the web pages and...