radio-symbol
Advanced tools
Comparing version 0.2.1 to 0.2.2
10
index.js
'use strict'; | ||
var win = require('is-windows'); | ||
var green = require('ansi-green'); | ||
var gray = require('ansi-gray'); | ||
var win = process.platform === 'win32'; | ||
@@ -31,12 +31,12 @@ module.exports = { | ||
star: { | ||
on: green('★'), | ||
on: '★', | ||
off: '☆', | ||
disabled: gray('☆') | ||
disabled: '☆' | ||
}, | ||
ballot: { | ||
on: green('☑'), | ||
on: '☑', | ||
off: '☐', | ||
disabled: gray('☒') | ||
disabled: '☒' | ||
} | ||
}; |
{ | ||
"name": "radio-symbol", | ||
"description": "Unicode radio button symbol, for toggling on/off in prompts.", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"homepage": "https://github.com/enquirer/radio-symbol", | ||
@@ -13,5 +13,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"files": [ | ||
"index.js", | ||
"LICENSE", | ||
"README.md" | ||
"index.js" | ||
], | ||
@@ -27,3 +25,4 @@ "main": "index.js", | ||
"ansi-gray": "^0.1.1", | ||
"ansi-green": "^0.1.1" | ||
"ansi-green": "^0.1.1", | ||
"is-windows": "^1.0.1" | ||
}, | ||
@@ -53,6 +52,6 @@ "devDependencies": { | ||
"list": [ | ||
"error-symbol", | ||
"info-symbol", | ||
"warning-symbol", | ||
"success-symbol", | ||
"error-symbol" | ||
"warning-symbol" | ||
] | ||
@@ -59,0 +58,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
# radio-symbol [![NPM version](https://img.shields.io/npm/v/radio-symbol.svg?style=flat)](https://www.npmjs.com/package/radio-symbol) [![NPM downloads](https://img.shields.io/npm/dm/radio-symbol.svg?style=flat)](https://npmjs.org/package/radio-symbol) | ||
# radio-symbol [![NPM version](https://img.shields.io/npm/v/radio-symbol.svg?style=flat)](https://www.npmjs.com/package/radio-symbol) [![NPM monthly downloads](https://img.shields.io/npm/dm/radio-symbol.svg?style=flat)](https://npmjs.org/package/radio-symbol) [![NPM total downloads](https://img.shields.io/npm/dt/radio-symbol.svg?style=flat)](https://npmjs.org/package/radio-symbol) | ||
@@ -8,2 +8,3 @@ > Unicode radio button symbol, for toggling on/off in prompts. | ||
- [Install](#install) | ||
- [Styles](#styles) | ||
- [Usage](#usage) | ||
@@ -14,8 +15,2 @@ * [Circle symbol](#circle-symbol) | ||
- [About](#about) | ||
* [Related projects](#related-projects) | ||
* [Contributing](#contributing) | ||
* [Building docs](#building-docs) | ||
* [Running tests](#running-tests) | ||
* [Author](#author) | ||
* [License](#license) | ||
@@ -32,9 +27,22 @@ _(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ | ||
Install with [yarn](https://yarnpkg.com): | ||
```sh | ||
$ yarn add radio-symbol | ||
``` | ||
## Styles | ||
Have an idea for another radio-symbol style? [Pull requests](../../issues) greatly appreciated! | ||
## Usage | ||
* All of the `on` states are styled using ansi green. | ||
* All of the `disabled` states are styled using ansi gray. | ||
* All of the `off` states are unstyled. | ||
* All of the `on` states are styled using [ansi green](https://github.com/jonschlinkert/ansi-green). | ||
* All of the `disabled` states are styled using [ansi gray](ansi-gray). | ||
For unstyled states, use: | ||
**Unstyled** | ||
A `.nocolor` property is exposed with all states unstyled: | ||
```js | ||
@@ -48,3 +56,3 @@ var radio = require('radio-symbol').nocolor; | ||
_(I haven't tested the star or ballot symbols on windows, if you try them let us know if they work! pr for alternatives are also very welcome!)._ | ||
_(I haven't tested the star or ballot symbols on windows, if you try them [let us know](../../issues/new) if they have issues!)._ | ||
@@ -119,8 +127,8 @@ ```js | ||
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ | ||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ | ||
To generate the readme and API documentation with [verb](https://github.com/verbose/verb): | ||
To generate the readme, run the following command: | ||
```sh | ||
$ npm install -g verb verb-generate-readme && verb | ||
$ npm install -g verbose/verb#dev verb-generate-readme && verb | ||
``` | ||
@@ -130,6 +138,6 @@ | ||
Install dev dependencies: | ||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: | ||
```sh | ||
$ npm install -d && npm test | ||
$ npm install && npm test | ||
``` | ||
@@ -142,11 +150,11 @@ | ||
* [github/jonschlinkert](https://github.com/jonschlinkert) | ||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) | ||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) | ||
### License | ||
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). | ||
Released under the [MIT license](https://github.com/enquirer/radio-symbol/blob/master/LICENSE). | ||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). | ||
Released under the [MIT License](LICENSE). | ||
*** | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 01, 2016._ | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 28, 2017._ |
Sorry, the diff of this file is not supported yet
7266
153
3
+ Addedis-windows@^1.0.1
+ Addedis-windows@1.0.2(transitive)