Comparing version 1.2.4 to 1.3.0
{ | ||
"name": "ansi-art", | ||
"version": "1.2.4", | ||
"version": "1.3.0", | ||
"author": "gaurav chikhale", | ||
@@ -35,3 +35,2 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "webpack -p", | ||
@@ -38,0 +37,0 @@ "watch": "webpack --watch --progress", |
@@ -1,2 +0,3 @@ | ||
#### ANSI ART | ||
# ANSI ART | ||
[![npm](https://img.shields.io/npm/v/ansi-art.svg?maxAge=000)](https://www.npmjs.com/package/ansi-art) [![npm](https://img.shields.io/npm/dm/ansi-art.svg?maxAge=000)](https://www.npmjs.com/package/ansi-art) | ||
@@ -6,17 +7,15 @@ | ||
https://gauravchl.github.io/ansi-art/webapp/ | ||
<https://gauravchl.github.io/ansi-art/webapp/> | ||
<img width="510" alt="screen shot 2017-04-25 at 11 51 53 am" src="https://cloud.githubusercontent.com/assets/3471415/25371301/b440ebe6-29ad-11e7-8459-abbea63e1630.png"> | ||
![screen shot 2017-04-25 at 11 51 53 am](https://cloud.githubusercontent.com/assets/3471415/25371301/b440ebe6-29ad-11e7-8459-abbea63e1630.png) | ||
## Install | ||
**Steps:** | ||
1. Create and download the ANSI art from webapp: https://gauravchl.github.io/ansi-art/webapp/ | ||
2. Install `npm install ansi-art ` package to render the downloaded art file. | ||
1. Create and download the ANSI art from webapp: <https://gauravchl.github.io/ansi-art/webapp/> | ||
2. Install `npm install ansi-art` package to render the downloaded art file. | ||
3. You can also render the pre-made art files in '/src/arts/'. | ||
## Examples | ||
**Examples:** | ||
``` | ||
```js | ||
// Using existing art | ||
@@ -26,16 +25,12 @@ let ANSI = require('ansi-art').default; | ||
console.log(mario); | ||
``` | ||
``` | ||
```js | ||
// Or use it with ES6 module | ||
import ANSI from 'ansi-art'; | ||
let mario = ANSI.get({artName: 'mario'}); | ||
console.log(mario); | ||
``` | ||
``` | ||
```js | ||
// Using custom art file | ||
@@ -47,3 +42,10 @@ import ANSI from 'ansi-art'; | ||
```js | ||
// Using random art | ||
import ANSI from 'ansi-art'; | ||
let art = ANSI.get({speechText: 'Hello world'}) | ||
console.log(art); | ||
``` | ||
```js | ||
// Using Speech bubble | ||
@@ -53,27 +55,21 @@ import ANSI from 'ansi-art'; | ||
console.log(art); | ||
``` | ||
**ANSI.get(options):** | ||
### ANSI.get(options) | ||
Parameter | Type | Description | ||
------|------ | ------------- | ||
options.filePath | string | Path to custom ANSI art file(eg: ~/mario.ansi) | ||
options.artName | string | Name of existing ANSI art available within package.[See available arts](https://github.com/gauravchl/ansi-art/blob/master/src/arts/) | ||
options.speechText | string | If provided, render the text inside 'speech bubble' above the ANSI art | ||
Parameter | Type | Description | ||
--------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ | ||
options.filePath | string | Path to custom ANSI art file(eg: ~/mario.ansi) | ||
options.artName | string | Name of existing ANSI art available within package.[See available arts](https://github.com/gauravchl/ansi-art/blob/master/src/arts/) | ||
options.speechText | string | If provided, render the text inside 'speech bubble' above the ANSI art | ||
options.speechBubbleOptions | object | options for speech bubble, [See available options here](https://github.com/gauravchl/node-chat-bubble) | ||
![screen shot 2017-05-14 at 4 57 37 pm](https://cloud.githubusercontent.com/assets/3471415/26033277/97663dc8-38c6-11e7-88d3-3d4534642ef4.png) | ||
Mario credits: <https://github.com/acarl005/node-super-mario> | ||
Parrot credits: <https://github.com/matheuss/parrotsay-api> | ||
## Contributing | ||
<img width="242" alt="screen shot 2017-05-14 at 4 57 37 pm" src="https://cloud.githubusercontent.com/assets/3471415/26033277/97663dc8-38c6-11e7-88d3-3d4534642ef4.png"> | ||
Mario credits: https://github.com/acarl005/node-super-mario | ||
Parrot credits: https://github.com/matheuss/parrotsay-api | ||
**Contributing** | ||
Please feel free to submit any bugs or suggestions as issues or request to add any art into existing collections. Pull requests are welcome. |
@@ -20,3 +20,4 @@ 'use-strict'; | ||
} else { | ||
return 'artName or filePath required.'; | ||
const art = arts[Math.floor(Math.random() * arts.length)]; | ||
result = fs.readFileSync(art.path, 'utf8'); | ||
} | ||
@@ -28,3 +29,2 @@ | ||
module.exports = { get, default: { get } }; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
0
1
173312
17
77
72
2