From 93d465e1ba004dd2cbfa4b4bbc5802e9f6a85322 Mon Sep 17 00:00:00 2001 From: David B Date: Mon, 3 Dec 2018 14:10:51 +0100 Subject: [PATCH] fix file name --- README.md | 41 +++++++++++----------- package.json | 6 ++-- src/{index.js => check-flow-annotation.js} | 10 +++--- 3 files changed, 29 insertions(+), 28 deletions(-) rename src/{index.js => check-flow-annotation.js} (88%) diff --git a/README.md b/README.md index e0246b8..9930147 100644 --- a/README.md +++ b/README.md @@ -49,25 +49,26 @@ Usage: check-flow-annotation.js [options] path1 path2 path3 etc Note that options are written "--option=value" but short versions are written "-o value" - --help, -h - Displays help information about this script - 'index.js -h' or 'index.js --help' - - --version - Displays version info - index.js --version - - --strict, -s - Force to check "@flow strict" - - --exclude, -x - Allow to exclude certain paths or extensions, it‘s a comma separated value - example: 'build*','.src/static/*' - will be merged with default array: - ['node_modules*', '.git*', 'flow-typed*', '.*', '!*.+(js|jsx|mjs)'] - - --check, -c - Set a custom check - '@flow weak' or '@no flow' + --help, -h + Displays help information about this script + 'index.js -h' or 'index.js --help' + + --version + Displays version info + index.js --version + + --strict, -s + Force to check "@flow strict" + + --exclude, -x + Allow to exclude certain paths or extensions, + it‘s a comma separated value + example: 'build*','.src/static/*' + will be merged with default array: + ['node_modules*', '.git*', 'flow-typed*', '.*', '!*.+(js|jsx|mjs)'] + + --check, -c + Set a custom check + '@flow weak' or '@no flow' ``` diff --git a/package.json b/package.json index d171b5f..6e9b78e 100644 --- a/package.json +++ b/package.json @@ -15,16 +15,16 @@ "engines": { "node": ">= 8" }, - "main": "src/index.js", + "main": "src/check-flow-annotation.js", "repository": { "type": "git", "url": "https://github.com/DavidBabel/check-flow-annotation" }, "bin": { - "check-flow-annotation": "./src/index.js" + "check-flow-annotation": "./src/check-flow-annotation.js" }, "scripts": { - "start": "./src/index.js", + "start": "./src/check-flow-annotation.js", "test": "jest --coverage", "test:watch": "jest --watch", "precommit": "lint-staged" diff --git a/src/index.js b/src/check-flow-annotation.js similarity index 88% rename from src/index.js rename to src/check-flow-annotation.js index a67e4a1..475ad5c 100755 --- a/src/index.js +++ b/src/check-flow-annotation.js @@ -10,7 +10,7 @@ require('colors'); function exec(inputArgs = argv) { const args = inputArgs .info( - `Usage: check-flow-annotation.js [options] path1 path2 path3 etc + `Usage: check-flow-annotation [options] path1 path2 path3 etc By default it checks every ".js", ".jsx" and ".mjs" in your project, but you can filter it with exclude option @@ -30,11 +30,11 @@ function exec(inputArgs = argv) { name: 'exclude', short: 'x', type: 'list,csv', - description: - 'Allow to exclude certain paths or extensions, it‘s a comma separated value', + description: `Allow to exclude certain paths or extensions, + it‘s a comma separated value`, example: `example: 'build*','.src/static/*' - will be merged with default array: - ['node_modules*', '.git*', 'flow-typed*', '.*', '!*.+(js|jsx|mjs)']` + will be merged with default array: + ['node_modules*', '.git*', 'flow-typed*', '.*', '!*.+(js|jsx|mjs)']` }, { name: 'check',