integrate npmpage
This commit is contained in:
parent
92c4ca336d
commit
efeb2507bc
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,6 +1,8 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
coverage/
|
coverage/
|
||||||
docs/
|
pages/
|
||||||
|
public/
|
||||||
|
|
||||||
|
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ image: hosttoday/ht-docker-node:npmts
|
|||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
|
- page
|
||||||
|
|
||||||
testLEGACY:
|
testLEGACY:
|
||||||
stage: test
|
stage: test
|
||||||
@ -33,3 +34,15 @@ release:
|
|||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
pages:
|
||||||
|
image: hosttoday/ht-docker-node:npmpage
|
||||||
|
stage: page
|
||||||
|
script:
|
||||||
|
- npmci command npmpage --host gitlab
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
artifacts:
|
||||||
|
expire_in: 1 week
|
||||||
|
paths:
|
||||||
|
- public
|
12
.npmignore
12
.npmignore
@ -1,7 +1,11 @@
|
|||||||
test/
|
|
||||||
ts/
|
|
||||||
ts/typings/
|
|
||||||
.idea/
|
|
||||||
node_modules/
|
node_modules/
|
||||||
coverage/
|
coverage/
|
||||||
|
pages/
|
||||||
|
public/
|
||||||
|
|
||||||
|
ts/
|
||||||
docs/
|
docs/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.nogit/
|
||||||
|
15
.travis.yml
15
.travis.yml
@ -1,15 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "4"
|
|
||||||
- "stable"
|
|
||||||
deploy:
|
|
||||||
provider: npm
|
|
||||||
email: npm@lossless.digital
|
|
||||||
api_key:
|
|
||||||
secure: NFZBWxf3BEuTu7eEQNqLtn7QD4pUJYovHVPL9x9iSx8wNCRL5keSPRx8vlmVTx4ddk5KmIERlw3i7ZLrF72msaiuU34kBh6edOpeswfBE0zR/WbV4ZU/LdxaP4bevYsl+gJnt5A4jHHFO6mqFp/R5vnqVkX3sAsPNr6cEVo8b3uNHHVxqs/gsoU/XBrNmQxPVbK1E/sVabZ/9blujxxTzGoyXbC2dIaD5sJ6z/mSagw1sCwrOdM7o0UDzsm81AtnFGegAmkd5Ps0dlcVdulKEcQkkfd9D3iq4SQ3efQVTSqD559bazxADf5VicoaEPAv8OVe8vKtc76KCiZfR5463Jl3LUoAt7UsX73aEsIg1cTsxkJCsGoiUqUQEucYKt8UcoicXJp2IUXRVkOxeXRRapERJgVKSSI965J5VqF3ZKWMnxfjrLde++wdrJ9L7EaTJbwDJohV4jqo794lv1yL+wWGO18NETQ01eV9LRDYCH/NOmWY7AZDNj2I1Ou2YImqxrFJfi1up4lOa+A4bcs6NSh3p/if4xBdOa5ALAWqQ7iUk1FReMPsLXZNLIgtUPbal+yR37DWDZ6imiYfJ5IMRV01yPGP6sBLnveTGR6DH1SxiycmIc0NOqFXjmgjtopCwRrpCUb1GBxMSNunvKyxrPJ+7Sxvbupcek3/tHf+z5g=
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
repo: pushrocks/beautylog
|
|
||||||
notifications:
|
|
||||||
slack:
|
|
||||||
secure: VBAcnFNkROLEa0vrp0qu8rBC8OlOvxpnYwqv3NMIbLie3Cq1YS03DwhqX0YV1hEBiGqh5cBe3s3PxtY8LHF5QjB4/82nQJSUHdcUxPTLh9Eq6IZaKCnSEFhMKPbZw0TwULIlbLv1RV/te1+G+fVKguCn4+f5TqTRxntYErVQu/0ovDa9ln3vtlqhDg9lYk3FBFqOszbHL81Xr2KpDj2DN/15nRmxEGGpnhzQV44HZg/W93EaUqTyF+NCtStPCbpOKno0s89rYRXMosuP+1odpNcSouVqWscEZSNCIg1NTTLY0N8T51pX1g8Lw9Qz80OMRnn8D83mVvNNqLJx5vQ8THz96/L77Syih6a5Qr0AyE7hGcbNrfG+3LvomHDARQ9Tv2KqDcrkiTdh7NtXYiQogxdWYx9OzTUOau4z8K5tr9lLlqFa6WYkFFaoc/+49IFAkgoUXg65gTYUMkP76xu/MC0XEOTU2+jvXLyyTpacD7nWRcbrI8XG7oCvT3BUc/boe4DSIqCwgaffqDVxld+dnVju2xKHedRC/OwhKXMnrBqFSlF2OTn67yFjxeq5DKxzyfwBKv9ia9FPqADSPTqaRJuE4eydM6u4cTdU1+8yQJNaPk0NRMmhksH2vscwaAdxX3kyUxi7DrS8qxpg1FZCA34YSmXyk88Ov8ZNPBL82xI=
|
|
19
README.md
19
README.md
@ -1,12 +1,20 @@
|
|||||||
# beautylog
|
# beautylog
|
||||||
beautiful logging, TypeScript ready
|
beautiful logging, TypeScript ready
|
||||||
|
|
||||||
## Status
|
## Availabililty
|
||||||
|
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/beautylog)
|
||||||
|
[![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/beautylog)
|
||||||
|
[![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/pushrocks/beautylog)
|
||||||
|
[![docs](https://push.rocks/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/beautylog/docs)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
[![build status](https://gitlab.com/pushrocks/beautylog/badges/master/build.svg)](https://gitlab.com/pushrocks/beautylog/commits/master)
|
[![build status](https://gitlab.com/pushrocks/beautylog/badges/master/build.svg)](https://gitlab.com/pushrocks/beautylog/commits/master)
|
||||||
|
[![coverage report](https://gitlab.com/pushrocks/beautylog/badges/master/coverage.svg)](https://gitlab.com/pushrocks/beautylog/commits/master)
|
||||||
[![Dependency Status](https://david-dm.org/pushrocks/beautylog.svg)](https://david-dm.org/pushrocks/beautylog)
|
[![Dependency Status](https://david-dm.org/pushrocks/beautylog.svg)](https://david-dm.org/pushrocks/beautylog)
|
||||||
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/beautylog/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/beautylog/master/dependencies/npm)
|
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/beautylog/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/beautylog/master/dependencies/npm)
|
||||||
[![bitHound Score](https://www.bithound.io/github/pushrocks/beautylog/badges/score.svg)](https://www.bithound.io/github/pushrocks/beautylog)
|
[![bitHound Code](https://www.bithound.io/github/pushrocks/beautylog/badges/code.svg)](https://www.bithound.io/github/pushrocks/beautylog)
|
||||||
[![codecov](https://codecov.io/gh/pushrocks/beautylog/branch/master/graph/badge.svg)](https://codecov.io/gh/pushrocks/beautylog)
|
[![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/)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -87,7 +95,6 @@ beautylog.remote.loggly({
|
|||||||
There is no need to change anything in your code.
|
There is no need to change anything in your code.
|
||||||
Everything that is getting logged to your console by node will get logged to loggly as well.
|
Everything that is getting logged to your console by node will get logged to loggly as well.
|
||||||
|
|
||||||
## About the authors:
|
For more information read the docs!
|
||||||
[![Project Phase](https://mediaserve.lossless.digital/lossless.com/img/createdby_github.svg)](https://lossless.com/)
|
|
||||||
|
|
||||||
[![PayPal](https://img.shields.io/badge/Support%20us-PayPal-blue.svg)](https://paypal.me/lossless)
|
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)
|
||||||
|
15
docs/book.json
Normal file
15
docs/book.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"structure": {
|
||||||
|
"readme": "index.md"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"tonic",
|
||||||
|
"edit-link"
|
||||||
|
],
|
||||||
|
"pluginsConfig": {
|
||||||
|
"edit-link": {
|
||||||
|
"base": "https://gitlab.com/pushrocks/beautylog/edit/master/docs/",
|
||||||
|
"label": "Edit on GitLab"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
100
docs/index.md
Normal file
100
docs/index.md
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
# beautylog
|
||||||
|
beautiful logging, TypeScript ready
|
||||||
|
|
||||||
|
## Availabililty
|
||||||
|
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/beautylog)
|
||||||
|
[![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/beautylog)
|
||||||
|
[![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/pushrocks/beautylog)
|
||||||
|
[![docs](https://push.rocks/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/beautylog/docs)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[![build status](https://gitlab.com/pushrocks/beautylog/badges/master/build.svg)](https://gitlab.com/pushrocks/beautylog/commits/master)
|
||||||
|
[![coverage report](https://gitlab.com/pushrocks/beautylog/badges/master/coverage.svg)](https://gitlab.com/pushrocks/beautylog/commits/master)
|
||||||
|
[![Dependency Status](https://david-dm.org/pushrocks/beautylog.svg)](https://david-dm.org/pushrocks/beautylog)
|
||||||
|
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/beautylog/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/beautylog/master/dependencies/npm)
|
||||||
|
[![bitHound Code](https://www.bithound.io/github/pushrocks/beautylog/badges/code.svg)](https://www.bithound.io/github/pushrocks/beautylog)
|
||||||
|
[![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/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
var beautylog = require("beautylog");
|
||||||
|
|
||||||
|
beautylog.log("some log message"); // normal console log message
|
||||||
|
beautylog.info("some log message") // info console log message
|
||||||
|
beautylog.ok("some log message"); // ok console log message
|
||||||
|
beautylog.warn("some log message"); // warn console log message
|
||||||
|
beautylog.success("some success message"); // success console log message
|
||||||
|
beautylog.error("some error message"); // error console log message
|
||||||
|
```
|
||||||
|
The plugin produces beautiful output like this:
|
||||||
|
![console.png](https://mediaserve.lossless.digital/github.com/pushrocks/beautylog/console.png)
|
||||||
|
|
||||||
|
### Ora Integration
|
||||||
|
beautylog wraps the excellent ora module from npm to better work with beautylog. In general that means that you can log persistent messages WHILE you are actually having an active Ora object. beautylog handles all the fuss for you.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
var myOra = new beautylog.Ora("my awesome text", "blue");
|
||||||
|
myOra.start();
|
||||||
|
beautylog.info("some persistent text") //does not disturb myOra
|
||||||
|
console.log("something") // even this works because console.log is monkeypatched by beautylog
|
||||||
|
myOra.text("some updated text");
|
||||||
|
myOra.stop();
|
||||||
|
```
|
||||||
|
|
||||||
|
### Console Tables
|
||||||
|
beautylog allows displaying data in nice tables for better overview.
|
||||||
|
|
||||||
|
> **Note:** This only works only in nodejs for now.
|
||||||
|
|
||||||
|
There are different types of tables.
|
||||||
|
|
||||||
|
#### Custom
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var beautylog = require("beautylog");
|
||||||
|
var myTable = beautylog.table.new("custom",["Heading1".blue,"Heading2".blue,"Heading3".blue]); // type "custom"
|
||||||
|
myTable.push(["check 1","success"]); // adds a row the myTable
|
||||||
|
myTable.push(["check 2","error"]); // adds a row the myTable
|
||||||
|
myTable.push(["check 3","error"]); // adds a row the myTable
|
||||||
|
myTable.print(); //prints myTable to the console
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Checks
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var beautylog = require("beautylog");
|
||||||
|
var myTable = beautylog.table.new("checks"); // type checks
|
||||||
|
myTable.push(["check 1","success"]); // adds a row to myTable
|
||||||
|
myTable.push(["check 2","error"]); // adds a row to myTable
|
||||||
|
myTable.push(["check 3","error"]); // adds a row to myTable
|
||||||
|
myTable.print(); //prints myTable to console
|
||||||
|
```
|
||||||
|
|
||||||
|
The table from the code with type "checks" above looks like this:
|
||||||
|
![table.png](https://mediaserve.lossless.digital/github.com/pushrocks/beautylog/table.png)
|
||||||
|
|
||||||
|
## Centralized remote logging
|
||||||
|
Beautylog makes it easy to have all your node applications log to a remote location.
|
||||||
|
|
||||||
|
Currently supported remote providers:
|
||||||
|
|
||||||
|
* loggly.com
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
beautylog.remote.loggly({
|
||||||
|
token: "loggly-token",
|
||||||
|
subdomain: "loggly-subdomain",
|
||||||
|
appName: "some App Name",
|
||||||
|
serverName: "some Server Name"
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: since beautylog monkeypatches all console log methods.
|
||||||
|
There is no need to change anything in your code.
|
||||||
|
Everything that is getting logged to your console by node will get logged to loggly as well.
|
||||||
|
|
||||||
|
For more information read the docs!
|
||||||
|
|
||||||
|
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)
|
@ -32,22 +32,22 @@
|
|||||||
"homepage": "https://gitlab.com/pushrocks/beautylog",
|
"homepage": "https://gitlab.com/pushrocks/beautylog",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/colors": "0.x.x",
|
"@types/colors": "0.x.x",
|
||||||
"@types/lodash": "0.x.x",
|
"@types/lodash": "4.x.x",
|
||||||
"@types/loggly": "1.x.x",
|
"@types/loggly": "1.x.x",
|
||||||
"@types/q": "0.x.x",
|
"@types/q": "0.x.x",
|
||||||
"cli-color": "^1.1.0",
|
"cli-color": "^1.1.0",
|
||||||
"cli-table2": "^0.2.0",
|
"cli-table2": "^0.2.0",
|
||||||
"colors": "1.1.2",
|
"colors": "1.1.2",
|
||||||
"figlet": "^1.1.2",
|
"figlet": "^1.1.2",
|
||||||
"lodash": "^4.14.1",
|
"lodash": "^4.15.0",
|
||||||
"loggly": "^1.1.0",
|
"loggly": "^1.1.0",
|
||||||
"ora": "^0.3.0",
|
"ora": "^0.3.0",
|
||||||
"q": "^1.4.1",
|
"q": "^1.4.1",
|
||||||
"smartenv": "^1.2.5",
|
"smartenv": "^1.2.5",
|
||||||
"typings-global": "^1.0.6"
|
"typings-global": "^1.0.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"npmts-g": "^5.2.8",
|
"npmts-g": "^5.2.8",
|
||||||
"typings-test": "^1.0.1"
|
"typings-test": "^1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user