This commit is contained in:
Philipp Kunz 2016-05-20 19:06:25 +02:00
parent ed078ee29a
commit 4dab0f250a
9 changed files with 81 additions and 1 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
node_modules/
docs/
coverage/
ts/typings/

2
dist/index.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
export declare let start: (moduleStringArg: string) => void;
export declare let stop: () => void;

16
dist/index.js vendored Normal file
View File

@ -0,0 +1,16 @@
"use strict";
/// <reference path="./typings/index.d.ts" />
var ora = require("ora");
var earlyOra;
exports.start = function (moduleStringArg) {
earlyOra = ora({
text: "Loading " + moduleStringArg.green,
spinner: "bouncingBar"
});
earlyOra.start();
};
exports.stop = function () {
earlyOra.stop();
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw2Q0FBNkM7QUFDN0MsSUFBSSxHQUFHLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDO0FBQ3pCLElBQUksUUFBUSxDQUFDO0FBRUYsYUFBSyxHQUFHLFVBQVMsZUFBc0I7SUFDOUMsUUFBUSxHQUFHLEdBQUcsQ0FBQztRQUNYLElBQUksRUFBQyxVQUFVLEdBQUcsZUFBZSxDQUFDLEtBQUs7UUFDdkMsT0FBTyxFQUFDLGFBQWE7S0FDeEIsQ0FBQyxDQUFDO0lBQ0gsUUFBUSxDQUFDLEtBQUssRUFBRSxDQUFDO0FBQ3JCLENBQUMsQ0FBQztBQUVTLFlBQUksR0FBRztJQUNkLFFBQVEsQ0FBQyxJQUFJLEVBQUUsQ0FBQztBQUNwQixDQUFDLENBQUMiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL2luZGV4LmQudHNcIiAvPlxyXG5sZXQgb3JhID0gcmVxdWlyZShcIm9yYVwiKTtcclxubGV0IGVhcmx5T3JhO1xyXG5cclxuZXhwb3J0IGxldCBzdGFydCA9IGZ1bmN0aW9uKG1vZHVsZVN0cmluZ0FyZzpzdHJpbmcpe1xyXG4gICAgZWFybHlPcmEgPSBvcmEoe1xyXG4gICAgICAgIHRleHQ6XCJMb2FkaW5nIFwiICsgbW9kdWxlU3RyaW5nQXJnLmdyZWVuLFxyXG4gICAgICAgIHNwaW5uZXI6XCJib3VuY2luZ0JhclwiXHJcbiAgICB9KTtcclxuICAgIGVhcmx5T3JhLnN0YXJ0KCk7XHJcbn07XHJcblxyXG5leHBvcnQgbGV0IHN0b3AgPSBmdW5jdGlvbigpe1xyXG4gICAgZWFybHlPcmEuc3RvcCgpO1xyXG59O1xyXG5cclxuIl19

View File

@ -18,5 +18,12 @@
"bugs": { "bugs": {
"url": "https://github.com/pushrocks/early/issues" "url": "https://github.com/pushrocks/early/issues"
}, },
"homepage": "https://github.com/pushrocks/early#readme" "homepage": "https://github.com/pushrocks/early#readme",
"devDependencies": {
"npmts": "^5.1.8"
},
"dependencies": {
"colors": "^1.1.2",
"ora": "^0.2.3"
}
} }

0
test/test.d.ts vendored Normal file
View File

15
test/test.js Normal file
View File

@ -0,0 +1,15 @@
"use strict";
/// <reference path="../ts/typings/index.d.ts" />
var early = require("../dist/index.js");
describe("early", function () {
it(".start()", function (done) {
this.timeout(10000);
early.start("early test");
setTimeout(done, 5000);
});
it(".stop()", function () {
early.stop();
});
});
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLGlEQUFpRDtBQUNqRCxJQUFPLEtBQUssV0FBVyxrQkFBa0IsQ0FBQyxDQUFDO0FBRTNDLFFBQVEsQ0FBQyxPQUFPLEVBQUM7SUFDYixFQUFFLENBQUMsVUFBVSxFQUFDLFVBQVMsSUFBSTtRQUN2QixJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3BCLEtBQUssQ0FBQyxLQUFLLENBQUMsWUFBWSxDQUFDLENBQUM7UUFDMUIsVUFBVSxDQUFDLElBQUksRUFBQyxJQUFJLENBQUMsQ0FBQztJQUMxQixDQUFDLENBQUMsQ0FBQztJQUNILEVBQUUsQ0FBQyxTQUFTLEVBQUM7UUFDVCxLQUFLLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDakIsQ0FBQyxDQUFDLENBQUE7QUFDTixDQUFDLENBQUMsQ0FBQSIsImZpbGUiOiJ0ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL3RzL3R5cGluZ3MvaW5kZXguZC50c1wiIC8+XHJcbmltcG9ydCBlYXJseSA9IHJlcXVpcmUoXCIuLi9kaXN0L2luZGV4LmpzXCIpO1xyXG5cclxuZGVzY3JpYmUoXCJlYXJseVwiLGZ1bmN0aW9uKCl7XHJcbiAgICBpdChcIi5zdGFydCgpXCIsZnVuY3Rpb24oZG9uZSl7XHJcbiAgICAgICAgdGhpcy50aW1lb3V0KDEwMDAwKTtcclxuICAgICAgICBlYXJseS5zdGFydChcImVhcmx5IHRlc3RcIik7XHJcbiAgICAgICAgc2V0VGltZW91dChkb25lLDUwMDApO1xyXG4gICAgfSk7XHJcbiAgICBpdChcIi5zdG9wKClcIixmdW5jdGlvbigpe1xyXG4gICAgICAgIGVhcmx5LnN0b3AoKTtcclxuICAgIH0pXHJcbn0pIl19

13
test/test.ts Normal file
View File

@ -0,0 +1,13 @@
/// <reference path="../ts/typings/index.d.ts" />
import early = require("../dist/index.js");
describe("early",function(){
it(".start()",function(done){
this.timeout(10000);
early.start("early test");
setTimeout(done,5000);
});
it(".stop()",function(){
early.stop();
})
})

17
ts/index.ts Normal file
View File

@ -0,0 +1,17 @@
/// <reference path="./typings/index.d.ts" />
let colors = require("colors");
let ora = require("ora");
let earlyOra;
export let start = function(moduleStringArg:string){
earlyOra = ora({
text:"Loading " + moduleStringArg.green,
spinner:"bouncingBar"
});
earlyOra.start();
};
export let stop = function(){
earlyOra.stop();
};

6
ts/typings.json Normal file
View File

@ -0,0 +1,6 @@
{
"globalDependencies": {
"colors": "registry:dt/colors#0.6.0-1+20160501135139",
"node": "registry:dt/node#6.0.0+20160514165920"
}
}