Skip to content

Commit

Permalink
fix(md-aggregate): wrap with aiife
Browse files Browse the repository at this point in the history
  • Loading branch information
snomiao committed Jul 3, 2022
1 parent 55c4cfa commit 155b9d1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/md-aggregate/package.json
@@ -1,6 +1,6 @@
{
"name": "md-aggregate",
"version": "2.1.2",
"version": "2.1.3",
"description": "Aggregate README.md with CHANGELOG.md or whatever",
"keywords": [
"markdown",
Expand Down
39 changes: 20 additions & 19 deletions packages/md-aggregate/src/cli.ts
Expand Up @@ -3,23 +3,24 @@
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
import mdAggregate from ".";
(async function () {
const argv = await yargs(hideBin(process.argv))
.scriptName("md-aggregate")
.command("$0 <target> [input..]", "aggregate markdown files")
.example("preview: ", "md-aggregate README.md CHANGELOG.md ")
.example("one: ", "md-aggregate README.md CHANGELOG.md -w")
.example("multi: ", "md-aggregate README.md ABOUT.md LICENSE.md CHANGELOG.md -w")
.example("multi: ", "md-aggregate README.md -i ABOUT.md -i LICENSE.md -i CHANGELOG.md -w")
.option("target", { describe: "destination markdown file", type: "string" })
.option("input", { describe: "source markdown files", array: true, type: "string" })
.boolean("write")
.describe("w", "write mode (when missing you will get preview in console)")
.alias("i", "input")
.alias("t", "target")
.alias("w", "write")
.alias("h", "help")
.alias("v", "version")
.demandCommand(2).argv;

const argv = await yargs(hideBin(process.argv))
.scriptName("md-aggregate")
.command("$0 <target> [input..]", "aggregate markdown files")
.example("preview: ", "md-aggregate README.md CHANGELOG.md ")
.example("one: ", "md-aggregate README.md CHANGELOG.md -w")
.example("multi: ", "md-aggregate README.md ABOUT.md LICENSE.md CHANGELOG.md -w")
.example("multi: ", "md-aggregate README.md -i ABOUT.md -i LICENSE.md -i CHANGELOG.md -w")
.option("target", { describe: "destination markdown file", type: "string" })
.option("input", { describe: "source markdown files", array: true, type: "string" })
.boolean("write")
.describe("w", "write mode (when missing you will get preview in console)")
.alias("i", "input")
.alias("t", "target")
.alias("w", "write")
.alias("h", "help")
.alias("v", "version")
.demandCommand(2).argv;

await mdAggregate(argv);
await mdAggregate(argv);
})();

0 comments on commit 155b9d1

Please sign in to comment.