From bd590ca75ed15339db3b83f60581b527e52cfde7 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 14 Jul 2018 19:50:29 +0700 Subject: [PATCH] Extract the CLI --- cli.js | 20 -------------------- package.json | 6 ------ readme.md | 25 +------------------------ 3 files changed, 1 insertion(+), 50 deletions(-) delete mode 100755 cli.js diff --git a/cli.js b/cli.js deleted file mode 100755 index 402c99a..0000000 --- a/cli.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node -'use strict'; -const meow = require('meow'); -const superb = require('.'); - -const cli = meow(` - Examples - $ superb - legendary - - $ superb --all - ace - amazing - … - - Options - --all Get all the words instead of a random word -`); - -console.log(cli.flags.all ? superb.words.join('\n') : superb()); diff --git a/package.json b/package.json index 24918ff..850e5ab 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bin": "cli.js", "engines": { "node": ">=6" }, @@ -18,13 +17,9 @@ }, "files": [ "index.js", - "cli.js", "words.json" ], "keywords": [ - "cli-app", - "cli", - "bin", "superb", "awesome", "word", @@ -35,7 +30,6 @@ "rand" ], "dependencies": { - "meow": "^3.7.0", "unique-random-array": "^1.0.0" }, "devDependencies": { diff --git a/readme.md b/readme.md index bf15033..d2e874d 100644 --- a/readme.md +++ b/readme.md @@ -45,32 +45,9 @@ Type: `Array` All the words. - -## CLI - -``` -$ npm install --global superb -``` - -``` -$ superb --help - - Examples - $ superb - legendary - - $ superb --all - ace - amazing - … - - Options - --all Get all the words instead of a random word -``` - - ## Related +- [superb-cli](https://github.com/sindresorhus/superb-cli) - CLI for this module - [cat-names](https://github.com/sindresorhus/cat-names) - Get popular cat names - [dog-names](https://github.com/sindresorhus/dog-names) - Get popular dog names - [pokemon](https://github.com/sindresorhus/pokemon) - Get Pokémon names