From c2e032bbf4526ae567348eb1aa91569df4fedaaf Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Thu, 9 May 2019 19:19:49 +0200 Subject: [PATCH] fix(core): update --- npmextra.json | 2 +- package.json | 2 +- readme.md | 26 ++++++++++++++++++++++++++ test/test.ts | 4 ++-- ts/index.ts | 10 +++++----- ts/smartlog-source-ora.plugins.ts | 8 ++------ 6 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 readme.md diff --git a/npmextra.json b/npmextra.json index c79b7a4..d9212ab 100644 --- a/npmextra.json +++ b/npmextra.json @@ -14,4 +14,4 @@ "npmGlobalTools": [], "npmAccessLevel": "public" } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 639eba9..8895ff8 100644 --- a/package.json +++ b/package.json @@ -25,4 +25,4 @@ "@types/ora": "^3.2.0", "ora": "^3.4.0" } -} +} \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..1d138ba --- /dev/null +++ b/readme.md @@ -0,0 +1,26 @@ +# @pushrocks/smartlog-source-ora +a smartlog source wrapping ora for local display + +## Availabililty and Links +* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartlog-source-ora) +* [gitlab.com (source)](https://gitlab.com/pushrocks/smartlog-source-ora) +* [github.com (source mirror)](https://github.com/pushrocks/smartlog-source-ora) +* [docs (typedoc)](https://pushrocks.gitlab.io/smartlog-source-ora/) + +## Status for master +[![build status](https://gitlab.com/pushrocks/smartlog-source-ora/badges/master/build.svg)](https://gitlab.com/pushrocks/smartlog-source-ora/commits/master) +[![coverage report](https://gitlab.com/pushrocks/smartlog-source-ora/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartlog-source-ora/commits/master) +[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartlog-source-ora.svg)](https://www.npmjs.com/package/@pushrocks/smartlog-source-ora) +[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartlog-source-ora/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartlog-source-ora) +[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) +[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) +[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/) + +## Usage + +For further information read the linked docs at the top of this readme. + +> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) +| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) + +[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com) diff --git a/test/test.ts b/test/test.ts index 1317ea8..ca89123 100644 --- a/test/test.ts +++ b/test/test.ts @@ -3,12 +3,12 @@ import * as smartlogSourceOra from '../ts/index'; let smartOra: smartlogSourceOra.SmartlogSourceOra; -tap.test('should create an ora instance', async (tools) => { +tap.test('should create an ora instance', async tools => { smartOra = new smartlogSourceOra.SmartlogSourceOra(); expect(smartOra).to.be.instanceOf(smartlogSourceOra.SmartlogSourceOra); }); -tap.test('should start', async (tools) => { +tap.test('should start', async tools => { smartOra.text('getting started...'); await tools.delayFor(2000); smartOra.finishSuccess(); diff --git a/ts/index.ts b/ts/index.ts index 5ec658c..92918ee 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -6,9 +6,9 @@ export class SmartlogSourceOra { constructor() {} - public text (textArg: string) { + public text(textArg: string) { this.oraInstance.text = textArg; - if(!this.started) { + if (!this.started) { this.started = true; this.oraInstance.start(); } @@ -18,12 +18,12 @@ export class SmartlogSourceOra { this.oraInstance.stop(); } - public finishSuccess (textArg?: string) { + public finishSuccess(textArg?: string) { this.oraInstance.succeed(textArg); this.started = false; } - public finishFail () { + public finishFail() { this.oraInstance.fail(); this.started = false; } @@ -37,4 +37,4 @@ export class SmartlogSourceOra { this.finishFail(); this.text(textArg); } -} \ No newline at end of file +} diff --git a/ts/smartlog-source-ora.plugins.ts b/ts/smartlog-source-ora.plugins.ts index fbae5ab..c502521 100644 --- a/ts/smartlog-source-ora.plugins.ts +++ b/ts/smartlog-source-ora.plugins.ts @@ -1,13 +1,9 @@ // pushrocks scope import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces'; -export { - smartlogInterfaces -}; +export { smartlogInterfaces }; // third party scope import ora from 'ora'; -export { - ora -}; +export { ora };