-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add docs and improve config (#2)
* docs: add example folder * docs: add README file * chore: add TravisCI config and tweak other configs * ci: rename Travis CI config file
- Loading branch information
1 parent
dfbb2f6
commit 5bad453
Showing
9 changed files
with
2,028 additions
and
1,788 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,16 @@ | ||
language: node_js | ||
cache: yarn | ||
notifications: | ||
email: false | ||
node_js: | ||
- 10 | ||
- 12 | ||
install: yarn --frozen-lockfile | ||
script: yarn validate | ||
after_success: | ||
- npx codecov --disable=gcov | ||
- test $TRAVIS_BRANCH = "master" && test $TRAVIS_PULL_REQUEST = "false" && npx semantic-release | ||
branches: | ||
only: | ||
- develop | ||
- master |
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,33 @@ | ||
# snippets-table | ||
|
||
## Overview | ||
|
||
Tool to easily manage a table of snippets on a README file. | ||
|
||
## Installation | ||
|
||
Install the package: | ||
|
||
`npm i --dev snippets-table` or `yarn add -D snippets-table` | ||
|
||
## Usage | ||
|
||
Add the following lines to the README where the table of snippets should be created: | ||
|
||
```markdown | ||
<!-- SNIPPETS-TABLE:START - Do not remove or modify this line --> | ||
|
||
<!-- SNIPPETS-TABLE:END --> | ||
``` | ||
|
||
Run the command: | ||
|
||
`npm run snippets-table generate` or `yarn snippets-table generate` | ||
|
||
Alternatively, run it with `npx`: | ||
|
||
`npx snippets-table generate` | ||
|
||
## License | ||
|
||
MIT © [Arthur Denner](https://github.com/arthurdenner/) |
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,13 @@ | ||
# snippets-table-example | ||
|
||
Example of usage of the package. Check the raw version [here](https://raw.githubusercontent.com/arthurdenner/snippets-table/master/example/README.md). | ||
|
||
## How to test it | ||
|
||
- Check the `snippets/snippets.json` file; | ||
- Run the `update-readme` script; | ||
- See the ✨magic ✨. | ||
|
||
<!-- SNIPPETS-TABLE:START - Do not remove or modify this line --> | ||
|
||
<!-- SNIPPETS-TABLE:END --> |
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,10 @@ | ||
{ | ||
"name": "snippets-table-example", | ||
"version": "0.0.0", | ||
"main": "index.js", | ||
"author": "Arthur Denner <arthurdenner7@gmail.com>", | ||
"license": "MIT", | ||
"scripts": { | ||
"update-readme": "node ../src/cli.js" | ||
} | ||
} |
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,32 @@ | ||
{ | ||
"Sing ABC": { | ||
"description": "Song by Jackson 5", | ||
"prefix": "abc", | ||
"body": [ | ||
"A, B, C", | ||
"Easy as 1, 2, 3", | ||
"Or simple as Do-Re-Mi", | ||
"A, B, C, 1, 2, 3, baby you and me, girl!" | ||
] | ||
}, | ||
"Sing Take on Me": { | ||
"description": "Song by a-ha", | ||
"prefix": "takeOnMe", | ||
"body": [ | ||
"Take on me (take on me)", | ||
"Take me on (take on me)", | ||
"I'll be gone", | ||
"In a day or two" | ||
] | ||
}, | ||
"Sing Help": { | ||
"description": "Song by The Beatles", | ||
"prefix": "help", | ||
"body": [ | ||
"I need somebody", | ||
"(Help!) not just anybody", | ||
"(Help!) you know I need someone", | ||
"Help!" | ||
] | ||
} | ||
} |
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
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
Oops, something went wrong.