Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from MLH-Fellowship/feature-list
Migrate to Yargs and update eslint config
- Loading branch information
Showing
9 changed files
with
224 additions
and
2,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "oclif" | ||
} | ||
"extends": ["@ljharb", "@ljharb/eslint-config/node/latest"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,6 @@ dist | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Lockfiles | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
#!/usr/bin/env node | ||
/* eslint-disable no-magic-numbers */ | ||
|
||
require('@oclif/command').run() | ||
.then(require('@oclif/command/flush')) | ||
.catch(require('@oclif/errors/handle')) | ||
'use strict'; | ||
|
||
require('dotenv').config(); | ||
const Yargs = require('yargs'); | ||
const list = require('../src/commands/list'); | ||
|
||
Yargs.usage('Usage: $0 <command> [options]') | ||
.command('list', 'lists all repositories', function (yargs) { | ||
const argv = yargs | ||
.usage('Usage: $0 list [options]') | ||
.alias('g', 'group-by') | ||
.nargs('g', 1) | ||
.describe('g', 'Field to be grouped by') | ||
.alias('f', 'fields') | ||
.boolean('f') | ||
.describe('f', 'Show available fields') | ||
.help('h') | ||
.alias('h', 'help').argv; | ||
list(argv); | ||
}) | ||
.help('h') | ||
.alias('h', 'help') | ||
.parse(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,24 @@ | ||
{ | ||
"name": "repo-report", | ||
"description": "CLI to list all repos a user has access to, and report on their configuration in aggregate.", | ||
"version": "0.0.0", | ||
"author": "@MLH-Fellowship", | ||
"bin": { | ||
"repo-report": "./bin/run" | ||
}, | ||
"bugs": "https://github.com/MLH-Fellowship/repo-report/issues", | ||
"dependencies": { | ||
"@oclif/command": "^1", | ||
"@oclif/config": "^1", | ||
"@oclif/plugin-help": "^3", | ||
"@octokit/graphql": "^4.6.0", | ||
"cli-table": "^0.3.4", | ||
"dotenv": "^8.2.0", | ||
"log-symbols": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@oclif/dev-cli": "^1", | ||
"eslint": "^5.13", | ||
"eslint-config-oclif": "^3.1", | ||
"globby": "^10" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"files": [ | ||
"/bin", | ||
"/npm-shrinkwrap.json", | ||
"/oclif.manifest.json", | ||
"/src" | ||
], | ||
"homepage": "https://github.com/MLH-Fellowship/repo-report", | ||
"keywords": [ | ||
"oclif" | ||
], | ||
"license": "MIT", | ||
"main": "src/index.js", | ||
"oclif": { | ||
"commands": "./src/commands", | ||
"bin": "repo-report", | ||
"plugins": [ | ||
"@oclif/plugin-help" | ||
] | ||
}, | ||
"repository": "MLH-Fellowship/repo-report", | ||
"scripts": { | ||
"postpack": "rm -f oclif.manifest.json", | ||
"posttest": "eslint .", | ||
"prepack": "oclif-dev manifest && oclif-dev readme", | ||
"test": "echo NO TESTS", | ||
"version": "oclif-dev readme && git add README.md" | ||
} | ||
} | ||
"name": "repo-report", | ||
"version": "0.0.0", | ||
"description": "CLI to list all repos a user has access to, and report on their configuration in aggregate.", | ||
"main": "bin/run", | ||
"bin": { | ||
"repo-report": "./bin/run" | ||
}, | ||
"repository": "https://github.com/ljharb/repo-report", | ||
"author": "ljharb", | ||
"license": "MIT", | ||
"private": false, | ||
"dependencies": { | ||
"@octokit/graphql": "^4.6.0", | ||
"cli-table": "^0.3.4", | ||
"dotenv": "^8.2.0", | ||
"log-symbols": "^4.0.0", | ||
"yargs": "^16.2.0" | ||
}, | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^17.5.1", | ||
"eslint": "^7.20.0" | ||
} | ||
} |
Oops, something went wrong.