2016-05-19 23:25:17 +00:00
|
|
|
# early
|
2016-09-19 18:50:01 +00:00
|
|
|
minimal and fast loading plugin for startup time measuring
|
2016-05-19 23:25:17 +00:00
|
|
|
|
2016-09-18 21:12:58 +00:00
|
|
|
## Availabililty
|
2017-02-17 17:56:58 +00:00
|
|
|
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/early)
|
|
|
|
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/early)
|
|
|
|
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/early)
|
|
|
|
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/early/)
|
2016-09-18 21:12:58 +00:00
|
|
|
|
|
|
|
## Status for master
|
2017-02-17 17:56:58 +00:00
|
|
|
[![build status](https://GitLab.com/pushrocks/early/badges/master/build.svg)](https://GitLab.com/pushrocks/early/commits/master)
|
|
|
|
[![coverage report](https://GitLab.com/pushrocks/early/badges/master/coverage.svg)](https://GitLab.com/pushrocks/early/commits/master)
|
|
|
|
[![npm downloads per month](https://img.shields.io/npm/dm/early.svg)](https://www.npmjs.com/package/early)
|
2016-09-18 21:12:58 +00:00
|
|
|
[![Dependency Status](https://david-dm.org/pushrocks/early.svg)](https://david-dm.org/pushrocks/early)
|
|
|
|
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/early/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/early/master/dependencies/npm)
|
|
|
|
[![bitHound Code](https://www.bithound.io/github/pushrocks/early/badges/code.svg)](https://www.bithound.io/github/pushrocks/early)
|
|
|
|
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
|
|
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
|
|
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
|
|
|
|
2016-05-21 22:38:14 +00:00
|
|
|
## Usage
|
2017-02-17 17:56:58 +00:00
|
|
|
Use TypeScript for best in class instellisense.
|
2016-05-19 23:25:17 +00:00
|
|
|
|
2016-05-21 22:38:14 +00:00
|
|
|
```typescript
|
|
|
|
// Put the following at the start of your module
|
2016-05-19 23:25:17 +00:00
|
|
|
import * as early from "early";
|
2016-05-21 22:38:14 +00:00
|
|
|
early.start("myModuleName");
|
|
|
|
/*
|
|
|
|
do your loading stuff
|
|
|
|
*/
|
2016-09-15 12:59:22 +00:00
|
|
|
early.stop().then((loadingTime:number) => { // loadingTime in milliseconds
|
|
|
|
|
|
|
|
}); // stop "early" when your module is ready
|
2016-05-19 23:25:17 +00:00
|
|
|
```
|
2016-09-19 18:48:11 +00:00
|
|
|
|
2017-02-03 14:15:36 +00:00
|
|
|
For further information read the linked docs at the top of this README.
|
|
|
|
|
2017-02-17 17:56:58 +00:00
|
|
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
2017-02-03 14:15:36 +00:00
|
|
|
|
2017-02-17 17:56:58 +00:00
|
|
|
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|