-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Readme] update usage in README; use md-magic to keep help output in …
…sync
- Loading branch information
1 parent
34d7561
commit 62537ec
Showing
4 changed files
with
60 additions
and
14 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Tests: readme' | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
readme: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ljharb/actions/node/install@main | ||
name: 'nvm install lts/* && npm install' | ||
with: | ||
node-version: 'lts/*' | ||
- run: npm run generate-readme:check |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
const childProcess = require('child_process'); | ||
|
||
module.exports = { | ||
matchWord: 'MD-MAGIC-EXAMPLE', | ||
transforms: { | ||
/* Match <!-- MD-MAGIC-EXAMPLE:START (CLI_REFERENCE) --> */ | ||
CLI_REFERENCE() { | ||
const result = childProcess.execSync('node ./bin/can-merge --help', { | ||
env: { ...process.env, GH_TOKEN: undefined, GITHUB_TOKEN: undefined }, | ||
}); | ||
return [].concat('```txt', '$ npx can-merge --help', String(result), '```').join('\n'); | ||
}, | ||
}, | ||
callback() { | ||
console.log('markdown processing done'); | ||
}, | ||
}; | ||
|
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