suf-cli
suf-cli is a utility cli for automating readme stuff, like adding a license.
Usage
suf
this cli works by reading the suf.config(.json or .ts)
file, every cli module has its section in the config file, if you call the cli without any arguments it will ask you to create a config or it executes all modules present in the config, to add a module just execute the command for that module.
INFO: All arguments can start with - or --, but i would recommend to just use letters.
Command | |
---|
a | all | Calls all modules. |
b | badges | Calls the badges module. |
t | ts | d.ts | docs | Calls the tsDoc module. |
l | licence | Calls the license module. |
h | help | Displays this Message. |
Docs
badgeTypes
BadgeTypes
interface BadgeTypes {
circleci: '/circleci/build/github/<GITHUB>/<REPO>';
codecov: '/gh/<GITHUB>/<REPO>/branch/master/graph/badge.svg';
vscV: '/visual-studio-marketplace/v/<VSCODE>';
vscD: '/visual-studio-marketplace/d/<VSCODE>';
vscI: '/visual-studio-marketplace/i/<VSCODE>';
vscR: '/visual-studio-marketplace/r/<VSCODE>';
min: '/bundlephobia/min/<NAME>';
minzip: '/bundlephobia/minzip/<NAME>';
install: '/packagephobia/install/<NAME>';
publish: '/packagephobia/publish/<NAME>';
npmV: '/npm/v/<NAME>';
npmDW: '/npm/dw/<NAME>';
npmDM: '/npm/dm/<NAME>';
npmDY: '/npm/dy/<NAME>';
npmDT: '/npm/dt/<NAME>';
npmTypes: '/npm/types/<NAME>';
npmLicense: '/npm/license/<NAME>';
npmNode: '/npm/node/<NAME>';
npmDep: '/npm/dependents/<NAME>';
githubFollowers: '/github/followers/<GITHUB>';
githubForks: '/github/forks/<GITHUB>/<REPO>';
githubStars: '/github/stars/<GITHUB>/<REPO>';
githubIssues: '/github/issues/<GITHUB>/<REPO>';
githubLastCommit: '/github/last-commit/<GITHUB>/<REPO>';
}
BadgeLinkTypes
interface BadgeLinkTypes {
npm: 'https://www.npmjs.com/package/<NAME>';
github: 'https://github.com/<GITHUB>/<REPO>';
circleci: 'https://app.circleci.com/pipelines/github/<GITHUB>/<REPO>';
vscode: 'https://marketplace.visualstudio.com/items?itemName=<VSCODE>';
bundle: 'https://bundlephobia.com/result?p=<NAME>';
package: 'https://packagephobia.now.sh/result?p=<NAME>';
codecov: 'https://codecov.io/gh/<GITHUB>/<REPO>';
}
modules
BadgesModuleConfig
interface BadgesModuleConfig {
name: string;
github: string;
vscode?: string;
repo: string;
out?: string;
badges: ([keyof BadgeTypes, keyof BadgeLinkTypes, string] | [keyof BadgeTypes, keyof BadgeLinkTypes] | string)[];
externalConfig?: string;
}
TsDocModuleConfig
interface TsDocModuleConfig {
title?: string;
dir: string;
out: string;
include?: string[];
exclude?: string[];
}
LicenseModuleConfig
interface LicenseModuleConfig {
type: string;
year: string | null | number;
name: string;
out?: string;
file?: string;
}
ConfigFile
interface ConfigFile {
badges?: BadgesModuleConfig;
tsDoc?: Partial<TsDocModuleConfig>;
license?: LicenseModuleConfig;
}
Generated with suf-cli
Copyright (c) 2019 Leonard Grosoli Licensed under the MIT license.