Skip to content

Commit

Permalink
Document steal.done
Browse files Browse the repository at this point in the history
This adds docs for steal.done, fixes #489
  • Loading branch information
matthewp committed Sep 29, 2015
1 parent 0f6b3db commit 5602878
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/steal-done.md
@@ -0,0 +1,23 @@
@property {function} steal.done
@parent StealJS.functions

A promise for when the application has loaded. Useful if you want to automatically run some code (like tests) after everything has loaded.

@signature `steal.done()`

@return {Promise} A promise that will resolve when the [System.configMain] and [System.main] have loaded.

@body

## Use

Calling **steal.done** is useful in scenarios where you need to start some process after the dependency graph of your application has been fully imported. For example (used with [@steal]):

var steal = require("@steal");
var QUnit = require("qunit");

steal.done().then(function(){
QUnit.load();
});

This will start running QUnit tests after all modules have loaded.

0 comments on commit 5602878

Please sign in to comment.