This commit is contained in:
Philipp Kunz 2016-09-19 00:34:38 +02:00
parent eddc64b891
commit bfef45cab3
13 changed files with 65 additions and 849 deletions

View File

@ -1 +0,0 @@
import 'typings-global';

48
dist/early.child.js vendored
View File

@ -1,48 +0,0 @@
"use strict";
require("typings-global");
const chalk = require("chalk");
const readline = require("readline");
let rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
let moduleName;
let loaderLength;
let frameCounter = 0;
let makeFrame = () => {
let resultString = `[${chalk.green('/'.repeat(frameCounter))}${' '.repeat(loaderLength - frameCounter)}] starting ${moduleName}`;
if (frameCounter === loaderLength) {
frameCounter = 0;
}
else {
frameCounter++;
}
return resultString;
};
let logEarlyAbort = false;
let logEarly = () => {
if (!logEarlyAbort) {
rl.write(null, { ctrl: true, name: 'u' });
rl.write(makeFrame());
setTimeout(function () {
logEarly();
}, 80);
}
else {
rl.write(null, { ctrl: true, name: 'u' });
rl.close();
setTimeout(function () {
process.exit(0);
}, 80);
}
};
let start = function (moduleNameArg = '', loaderLengthArg = '10') {
moduleName = moduleNameArg;
loaderLength = parseInt(loaderLengthArg);
logEarly();
};
process.on('SIGINT', () => {
logEarlyAbort = true;
});
start();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWFybHkuY2hpbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9lYXJseS5jaGlsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLCtCQUErQjtBQUMvQixxQ0FBcUM7QUFDckMsSUFBSSxFQUFFLEdBQUcsUUFBUSxDQUFDLGVBQWUsQ0FBQztJQUM5QixLQUFLLEVBQUUsT0FBTyxDQUFDLEtBQUs7SUFDcEIsTUFBTSxFQUFFLE9BQU8sQ0FBQyxNQUFNO0NBQ3pCLENBQUMsQ0FBQTtBQUVGLElBQUksVUFBa0IsQ0FBQTtBQUN0QixJQUFJLFlBQW9CL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QUFHLEVBQUUsQ0FBQyxDQUFBO1FBQ3pDLEVBQUUsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtRQUNWLFVBQVUsQ0FBQztZQUNQLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUE7UUFDbkIsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFBO0lBQ1YsQ0FBQztBQUNMLENBQUMsQ0FBQTtBQUVELElBQUksS0FBSyxHQUFHLFVBQVUsYUFBYSxHQUFXLEVBQUUsRUFBRSxlQUFlLEdBQVcsSUFBSTtJQUM1RSxVQUFVLEdBQUcsYUFBYSxDQUFBO0lBQzFCLFlBQVksR0FBRyxRQUFRLENBQUMsZUFBZSxDQUFDLENBQUE7SUFDeEMsUUFBUSxFQUFFLENBQUE7QUFDZCxDQUFDLENBQUE7QUFFRCxPQUFPLENBQUMsRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUNqQixhQUFhLEdBQUcsSUFBSSxDQUFBO0FBQ3hCLENBQUMsQ0FBQyxDQUFBO0FBRUYsS0FBSyxFQUFFLENBQUEifQ==

3
dist/index.d.ts vendored
View File

@ -1,5 +1,8 @@
/// <reference types="q" />
import 'typings-global';
import q = require('q');
/**
* start the loading
*/
export declare let start: (moduleNameArg?: string, loaderLengthArg?: string) => void;
export declare let stop: () => q.Promise<number>;

38
dist/index.js vendored
View File

@ -1,34 +1,19 @@
"use strict";
require("typings-global");
const path = require("path");
const chalk = require("chalk");
const q = require("q");
const childProcess = require("child_process");
let earlyChild;
let doAnimation = true;
let doText = false;
let moduleName = 'undefined module name';
let startTime;
if (process.argv.indexOf('-v') !== -1 || process.env.CI) {
doAnimation = false;
}
if (process.argv.indexOf('-v') === -1 && process.env.CI) {
let startTime = Date.now();
if (process.argv.indexOf('-v') === -1) {
doText = true;
}
// exports
/**
* start the loading
*/
exports.start = function (moduleNameArg = '', loaderLengthArg = '10') {
startTime = Date.now();
moduleName = moduleNameArg;
if (doAnimation) {
earlyChild = childProcess.fork(path.join(__dirname, 'early.child.js'), [], {
env: {
moduleNameArg: moduleNameArg,
loaderLengthArg: loaderLengthArg,
CI: process.env.CI
}
});
}
else if (doText) {
if (doText) {
console.log(`**** starting ${chalk.green(moduleNameArg)} ****`);
}
};
@ -37,17 +22,8 @@ exports.stop = () => {
let endTime = Date.now();
let earlyExecutionTime = (endTime - startTime);
let earlyExecutionTimeString = (earlyExecutionTime / 1000).toString();
if (doAnimation) {
earlyChild.kill('SIGINT');
earlyChild.on('close', function () {
console.log(`loaded ${chalk.green(moduleName)} in ${earlyExecutionTimeString} seconds!`);
done.resolve(earlyExecutionTime);
});
}
else {
console.log(`... finished loading ${moduleName} in ${earlyExecutionTimeString}`);
done.resolve(earlyExecutionTime);
}
return done.promise;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLDZCQUE2QjtBQUM3QiwrQkFBK0I7QUFDL0IsdUJBQXVCO0FBQ3ZCLDhDQUE4QztBQUM5QyxJQUFJLFVBQVUsQ0FBQTtBQUVkLElBQUksV0FBVyxHQUFZLElBQUksQ0FBQTtBQUMvQixJQUFJLE1BQU0sR0FBWSxLQUFLLENBQUE7QUFDM0IsSUFBSSxVQUFVLEdBQVcsdUJBQXVCLENBQUE7QUFDaEQsSUFBSSxTQUFTLENBQUE7QUFFYixFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7SUFDdEQsV0FBVyxHQUFHLEtBQUssQ0FBQTtBQUN2QixDQUFDO0FBQ0QsRUFBRSxDQU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GLElBQUksQ0FBQyxPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FBQTtJQUNoQyxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtBQUN2QixDQUFDLENBQUEifQ==

View File

@ -1 +1 @@
var typedoc = typedoc || {};typedoc.search = typedoc.search || {};typedoc.search.data = {"kinds":{"1":"External module","32":"Variable","64":"Function"},"rows":[{"id":0,"kind":1,"name":"\"ts/early.child\"","url":"modules/_ts_early_child_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":32,"name":"rl","url":"modules/_ts_early_child_.html#rl","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/early.child\""},{"id":2,"kind":32,"name":"moduleName","url":"modules/_ts_early_child_.html#modulename","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/early.child\""},{"id":3,"kind":32,"name":"loaderLength","url":"modules/_ts_early_child_.html#loaderlength","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/early.child\""},{"id":4,"kind":32,"name":"frameCounter","url":"modules/_ts_early_child_.html#framecounter","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/early.child\""},{"id":5,"kind":64,"name":"makeFrame","url":"modules/_ts_early_child_.html#makeframe","classes":"tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/early.child\""},{"id":6,"kind":32,"name":"logEarlyAbort","url":"modules/_ts_early_child_.html#logearlyabort","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/early.child\""},{"id":7,"kind":64,"name":"logEarly","url":"modules/_ts_early_child_.html#logearly","classes":"tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/early.child\""},{"id":8,"kind":64,"name":"start","url":"modules/_ts_early_child_.html#start","classes":"tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/early.child\""},{"id":9,"kind":1,"name":"\"ts/index\"","url":"modules/_ts_index_.html","classes":"tsd-kind-external-module"},{"id":10,"kind":32,"name":"earlyChild","url":"modules/_ts_index_.html#earlychild","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/index\""},{"id":11,"kind":32,"name":"doAnimation","url":"modules/_ts_index_.html#doanimation","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/index\""},{"id":12,"kind":32,"name":"doText","url":"modules/_ts_index_.html#dotext","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/index\""},{"id":13,"kind":32,"name":"moduleName","url":"modules/_ts_index_.html#modulename","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/index\""},{"id":14,"kind":32,"name":"startTime","url":"modules/_ts_index_.html#starttime","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/index\""},{"id":15,"kind":64,"name":"start","url":"modules/_ts_index_.html#start","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"ts/index\""},{"id":16,"kind":64,"name":"stop","url":"modules/_ts_index_.html#stop","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"ts/index\""}]};
var typedoc = typedoc || {};typedoc.search = typedoc.search || {};typedoc.search.data = {"kinds":{"1":"External module","32":"Variable","64":"Function"},"rows":[{"id":0,"kind":1,"name":"\"ts/index\"","url":"modules/_ts_index_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":32,"name":"doText","url":"modules/_ts_index_.html#dotext","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/index\""},{"id":2,"kind":32,"name":"moduleName","url":"modules/_ts_index_.html#modulename","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/index\""},{"id":3,"kind":32,"name":"startTime","url":"modules/_ts_index_.html#starttime","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ts/index\""},{"id":4,"kind":64,"name":"start","url":"modules/_ts_index_.html#start","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"ts/index\""},{"id":5,"kind":64,"name":"stop","url":"modules/_ts_index_.html#stop","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"ts/index\""}]};

View File

@ -24,62 +24,25 @@
},
{
"id": 2,
"name": "\"ts/early.child\"",
"name": "\"ts/index\"",
"kind": 1,
"kindString": "External module",
"flags": {
"isExported": true
},
"originalName": "/Users/philkunz/gitlab/pushrocks/early/ts/early.child.ts",
"originalName": "/Users/philkunz/gitlab/pushrocks/early/ts/index.ts",
"children": [
{
"id": 6,
"name": "frameCounter",
"id": 3,
"name": "doText",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 11,
"character": 16
}
],
"type": {
"type": "instrinct",
"name": "number"
},
"defaultValue": "0"
},
{
"id": 5,
"name": "loaderLength",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 10,
"character": 16
}
],
"type": {
"type": "instrinct",
"name": "number"
}
},
{
"id": 9,
"name": "logEarlyAbort",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 23,
"character": 17
"fileName": "ts/index.ts",
"line": 7,
"character": 10
}
],
"type": {
@ -94,251 +57,10 @@
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 9,
"character": 14
}
],
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 3,
"name": "rl",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 4,
"character": 6
}
],
"type": {
"type": "instrinct",
"name": "unknown"
},
"defaultValue": " readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})"
},
{
"id": 10,
"name": "logEarly",
"kind": 64,
"kindString": "Function",
"flags": {},
"signatures": [
{
"id": 11,
"name": "logEarly",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"type": {
"type": "instrinct",
"name": "void"
}
}
],
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 24,
"character": 12
}
]
},
{
"id": 7,
"name": "makeFrame",
"kind": 64,
"kindString": "Function",
"flags": {},
"signatures": [
{
"id": 8,
"name": "makeFrame",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 13,
"character": 13
}
]
},
{
"id": 12,
"name": "start",
"kind": 64,
"kindString": "Function",
"flags": {},
"signatures": [
{
"id": 13,
"name": "start",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 14,
"name": "moduleNameArg",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "instrinct",
"name": "string"
},
"defaultValue": "\"\""
},
{
"id": 15,
"name": "loaderLengthArg",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "instrinct",
"name": "string"
},
"defaultValue": "\"10\""
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
],
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 40,
"character": 9
}
]
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
6,
5,
9,
4,
3
]
},
{
"title": "Functions",
"kind": 64,
"children": [
10,
7,
12
]
}
],
"sources": [
{
"fileName": "ts/early.child.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 16,
"name": "\"ts/index\"",
"kind": 1,
"kindString": "External module",
"flags": {
"isExported": true
},
"originalName": "/Users/philkunz/gitlab/pushrocks/early/ts/index.ts",
"children": [
{
"id": 18,
"name": "doAnimation",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/index.ts",
"line": 8,
"character": 15
}
],
"type": {
"type": "instrinct",
"name": "boolean"
},
"defaultValue": "true"
},
{
"id": 19,
"name": "doText",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/index.ts",
"line": 9,
"character": 10
}
],
"type": {
"type": "instrinct",
"name": "boolean"
},
"defaultValue": "false"
},
{
"id": 17,
"name": "earlyChild",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/index.ts",
"line": 6,
"character": 14
}
],
"type": {
"type": "instrinct",
"name": "any"
}
},
{
"id": 20,
"name": "moduleName",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "ts/index.ts",
"line": 10,
"character": 14
}
],
@ -349,7 +71,7 @@
"defaultValue": "\"undefined module name\""
},
{
"id": 21,
"id": 5,
"name": "startTime",
"kind": 32,
"kindString": "Variable",
@ -357,33 +79,40 @@
"sources": [
{
"fileName": "ts/index.ts",
"line": 11,
"line": 9,
"character": 13
}
],
"type": {
"type": "instrinct",
"name": "any"
}
"name": "number"
},
"defaultValue": " Date.now()"
},
{
"id": 22,
"id": 6,
"name": "start",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"comment": {
"shortText": "start the loading"
},
"signatures": [
{
"id": 23,
"id": 7,
"name": "start",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "start the loading"
},
"parameters": [
{
"id": 24,
"id": 8,
"name": "moduleNameArg",
"kind": 32768,
"kindString": "Parameter",
@ -395,7 +124,7 @@
"defaultValue": "\"\""
},
{
"id": 25,
"id": 9,
"name": "loaderLengthArg",
"kind": 32768,
"kindString": "Parameter",
@ -416,13 +145,13 @@
"sources": [
{
"fileName": "ts/index.ts",
"line": 21,
"line": 18,
"character": 16
}
]
},
{
"id": 26,
"id": 10,
"name": "stop",
"kind": 64,
"kindString": "Function",
@ -431,7 +160,7 @@
},
"signatures": [
{
"id": 27,
"id": 11,
"name": "stop",
"kind": 4096,
"kindString": "Call signature",
@ -445,7 +174,7 @@
"sources": [
{
"fileName": "ts/index.ts",
"line": 39,
"line": 25,
"character": 15
}
]
@ -456,19 +185,17 @@
"title": "Variables",
"kind": 32,
"children": [
18,
19,
17,
20,
21
3,
4,
5
]
},
{
"title": "Functions",
"kind": 64,
"children": [
22,
26
6,
10
]
}
],
@ -487,8 +214,7 @@
"kind": 1,
"children": [
1,
2,
16
2
]
}
]

View File

@ -72,7 +72,6 @@
<h3>External modules</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-external-module tsd-is-external"><a href="modules/_node_modules_typings_global_custom_d_.html" class="tsd-kind-icon">"node_<wbr>modules/typings-<wbr>global/custom.d"</a></li>
<li class="tsd-kind-external-module"><a href="modules/_ts_early_child_.html" class="tsd-kind-icon">"ts/early.child"</a></li>
<li class="tsd-kind-external-module"><a href="modules/_ts_index_.html" class="tsd-kind-icon">"ts/index"</a></li>
</ul>
</section>
@ -89,9 +88,6 @@
<li class="label tsd-is-external">
<span>Internals</span>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_ts_early_child_.html">"ts/early.child"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_ts_index_.html">"ts/index"</a>
</li>

View File

@ -104,9 +104,6 @@ early.stop().then((loadingTime:<span class="hljs-built_in">number</span>) =&gt;
<li class="label tsd-is-external">
<span>Internals</span>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_ts_early_child_.html">"ts/early.child"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_ts_index_.html">"ts/index"</a>
</li>

View File

@ -77,9 +77,6 @@
<li class="label tsd-is-external">
<span>Internals</span>
</li>
<li class=" tsd-kind-external-module">
<a href="_ts_early_child_.html">"ts/early.child"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="_ts_index_.html">"ts/index"</a>
</li>

View File

@ -1,332 +0,0 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>&quot;ts/early.child&quot; | early</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
<script src="../assets/js/modernizr.js"></script>
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">early</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="_ts_early_child_.html">&quot;ts/early.child&quot;</a>
</li>
</ul>
<h1>External module &quot;ts/early.child&quot;</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-not-exported">
<h3>Variables</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_early_child_.html#framecounter" class="tsd-kind-icon">frame<wbr>Counter</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_early_child_.html#loaderlength" class="tsd-kind-icon">loader<wbr>Length</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_early_child_.html#logearlyabort" class="tsd-kind-icon">log<wbr>Early<wbr>Abort</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_early_child_.html#modulename" class="tsd-kind-icon">module<wbr>Name</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_early_child_.html#rl" class="tsd-kind-icon">rl</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-not-exported">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_early_child_.html#logearly" class="tsd-kind-icon">log<wbr>Early</a></li>
<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_early_child_.html#makeframe" class="tsd-kind-icon">make<wbr>Frame</a></li>
<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_early_child_.html#start" class="tsd-kind-icon">start</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-not-exported">
<h2>Variables</h2>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="framecounter" class="tsd-anchor"></a>
<h3>frame<wbr>Counter</h3>
<div class="tsd-signature tsd-kind-icon">frame<wbr>Counter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> =&nbsp;0</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/early.child.ts:11</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="loaderlength" class="tsd-anchor"></a>
<h3>loader<wbr>Length</h3>
<div class="tsd-signature tsd-kind-icon">loader<wbr>Length<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/early.child.ts:10</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="logearlyabort" class="tsd-anchor"></a>
<h3>log<wbr>Early<wbr>Abort</h3>
<div class="tsd-signature tsd-kind-icon">log<wbr>Early<wbr>Abort<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> =&nbsp;false</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/early.child.ts:23</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="modulename" class="tsd-anchor"></a>
<h3>module<wbr>Name</h3>
<div class="tsd-signature tsd-kind-icon">module<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/early.child.ts:9</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="rl" class="tsd-anchor"></a>
<h3>rl</h3>
<div class="tsd-signature tsd-kind-icon">rl<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol"> =&nbsp;readline.createInterface({input: process.stdin,output: process.stdout})</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/early.child.ts:4</li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-not-exported">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<a name="logearly" class="tsd-anchor"></a>
<h3>log<wbr>Early</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">log<wbr>Early<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ts/early.child.ts:24</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<a name="makeframe" class="tsd-anchor"></a>
<h3>make<wbr>Frame</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">make<wbr>Frame<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ts/early.child.ts:13</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<a name="start" class="tsd-anchor"></a>
<h3>start</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">start<span class="tsd-signature-symbol">(</span>moduleNameArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, loaderLengthArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ts/early.child.ts:40</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> moduleNameArg: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> =&nbsp;&quot;&quot;</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> loaderLengthArg: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> =&nbsp;&quot;10&quot;</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class="label tsd-is-external">
<span>Internals</span>
</li>
<li class="current tsd-kind-external-module">
<a href="_ts_early_child_.html">"ts/early.child"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="_ts_index_.html">"ts/index"</a>
</li>
<li class="label tsd-is-external">
<span>Externals</span>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="_node_modules_typings_global_custom_d_.html">"node_<wbr>modules/typings-<wbr>global/custom.d"</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_early_child_.html#framecounter" class="tsd-kind-icon">frame<wbr>Counter</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_early_child_.html#loaderlength" class="tsd-kind-icon">loader<wbr>Length</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_early_child_.html#logearlyabort" class="tsd-kind-icon">log<wbr>Early<wbr>Abort</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_early_child_.html#modulename" class="tsd-kind-icon">module<wbr>Name</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_early_child_.html#rl" class="tsd-kind-icon">rl</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_early_child_.html#logearly" class="tsd-kind-icon">log<wbr>Early</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_early_child_.html#makeframe" class="tsd-kind-icon">make<wbr>Frame</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_early_child_.html#start" class="tsd-kind-icon">start</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="http://typedoc.io" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>

View File

@ -74,9 +74,7 @@
<section class="tsd-index-section tsd-is-not-exported">
<h3>Variables</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_index_.html#doanimation" class="tsd-kind-icon">do<wbr>Animation</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_index_.html#dotext" class="tsd-kind-icon">do<wbr>Text</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_index_.html#earlychild" class="tsd-kind-icon">early<wbr>Child</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_index_.html#modulename" class="tsd-kind-icon">module<wbr>Name</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_ts_index_.html#starttime" class="tsd-kind-icon">start<wbr>Time</a></li>
</ul>
@ -93,33 +91,13 @@
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-not-exported">
<h2>Variables</h2>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="doanimation" class="tsd-anchor"></a>
<h3>do<wbr>Animation</h3>
<div class="tsd-signature tsd-kind-icon">do<wbr>Animation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> =&nbsp;true</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/index.ts:8</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="dotext" class="tsd-anchor"></a>
<h3>do<wbr>Text</h3>
<div class="tsd-signature tsd-kind-icon">do<wbr>Text<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> =&nbsp;false</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/index.ts:9</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="earlychild" class="tsd-anchor"></a>
<h3>early<wbr>Child</h3>
<div class="tsd-signature tsd-kind-icon">early<wbr>Child<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/index.ts:6</li>
<li>Defined in ts/index.ts:7</li>
</ul>
</aside>
</section>
@ -129,17 +107,17 @@
<div class="tsd-signature tsd-kind-icon">module<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> =&nbsp;&quot;undefined module name&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/index.ts:10</li>
<li>Defined in ts/index.ts:8</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="starttime" class="tsd-anchor"></a>
<h3>start<wbr>Time</h3>
<div class="tsd-signature tsd-kind-icon">start<wbr>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<div class="tsd-signature tsd-kind-icon">start<wbr>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> =&nbsp;Date.now()</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in ts/index.ts:11</li>
<li>Defined in ts/index.ts:9</li>
</ul>
</aside>
</section>
@ -156,9 +134,14 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ts/index.ts:21</li>
<li>Defined in ts/index.ts:18</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>start the loading</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
@ -182,7 +165,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ts/index.ts:39</li>
<li>Defined in ts/index.ts:25</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">q.Promise</span></h4>
@ -200,9 +183,6 @@
<li class="label tsd-is-external">
<span>Internals</span>
</li>
<li class=" tsd-kind-external-module">
<a href="_ts_early_child_.html">"ts/early.child"</a>
</li>
<li class="current tsd-kind-external-module">
<a href="_ts_index_.html">"ts/index"</a>
</li>
@ -216,15 +196,9 @@
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_index_.html#doanimation" class="tsd-kind-icon">do<wbr>Animation</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_index_.html#dotext" class="tsd-kind-icon">do<wbr>Text</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_index_.html#earlychild" class="tsd-kind-icon">early<wbr>Child</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_ts_index_.html#modulename" class="tsd-kind-icon">module<wbr>Name</a>
</li>

View File

@ -1,50 +0,0 @@
import 'typings-global'
import chalk = require('chalk')
import readline = require('readline')
let rl = readline.createInterface({
input: process.stdin,
output: process.stdout
})
let moduleName: string
let loaderLength: number
let frameCounter: number = 0
let makeFrame = (): string => {
let resultString: string = `[${chalk.green('/'.repeat(frameCounter))}${' '.repeat(loaderLength - frameCounter)}] starting ${moduleName}`
if (frameCounter === loaderLength) {
frameCounter = 0
} else {
frameCounter++
}
return resultString
}
let logEarlyAbort = false
let logEarly = () => {
if (!logEarlyAbort) {
rl.write(null, { ctrl: true, name: 'u' })
rl.write(makeFrame())
setTimeout(function () {
logEarly()
}, 80)
} else {
rl.write(null, { ctrl: true, name: 'u' })
rl.close()
setTimeout(function () {
process.exit(0)
}, 80)
}
}
let start = function (moduleNameArg: string = '', loaderLengthArg: string = '10') {
moduleName = moduleNameArg
loaderLength = parseInt(loaderLengthArg)
logEarly()
}
process.on('SIGINT', () => {
logEarlyAbort = true
})
start()

View File

@ -2,36 +2,22 @@ import 'typings-global'
import path = require('path')
import chalk = require('chalk')
import q = require('q')
import childProcess = require('child_process')
let earlyChild
let doAnimation: boolean = true
let doText: boolean = false
let moduleName: string = 'undefined module name'
let startTime
let startTime = Date.now()
if (process.argv.indexOf('-v') !== -1 || process.env.CI) {
doAnimation = false
}
if (process.argv.indexOf('-v') === -1 && process.env.CI) {
if (process.argv.indexOf('-v') === -1) {
doText = true
}
// exports
/**
* start the loading
*/
export let start = function (moduleNameArg: string = '', loaderLengthArg: string = '10') {
startTime = Date.now()
moduleName = moduleNameArg
if (doAnimation) {
earlyChild = childProcess.fork(path.join(__dirname, 'early.child.js'), [], {
env: {
moduleNameArg: moduleNameArg,
loaderLengthArg: loaderLengthArg,
CI: process.env.CI
}
})
} else if (doText) {
if (doText) {
console.log(`**** starting ${chalk.green(moduleNameArg)} ****`)
}
}
@ -41,15 +27,7 @@ export let stop = (): q.Promise<number> => {
let endTime = Date.now()
let earlyExecutionTime: number = (endTime - startTime)
let earlyExecutionTimeString: string = (earlyExecutionTime / 1000).toString()
if (doAnimation) {
earlyChild.kill('SIGINT')
earlyChild.on('close', function () {
console.log(`loaded ${chalk.green(moduleName)} in ${earlyExecutionTimeString} seconds!`)
done.resolve(earlyExecutionTime)
})
} else {
console.log(`... finished loading ${moduleName} in ${earlyExecutionTimeString}`)
done.resolve(earlyExecutionTime)
}
return done.promise
}