Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacksteamdev/plop-md
Use a markdown file to tell PlopJS how to setup your project. Plop dozens of files at once.
https://github.com/jacksteamdev/plop-md
Last synced: 22 days ago
JSON representation
Use a markdown file to tell PlopJS how to setup your project. Plop dozens of files at once.
- Host: GitHub
- URL: https://github.com/jacksteamdev/plop-md
- Owner: jacksteamdev
- Created: 2020-03-10T15:26:14.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-03T06:19:40.000Z (over 1 year ago)
- Last Synced: 2024-10-24T22:44:20.409Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 530 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `@bumble/plop-md`
Use a markdown file to tell PlopJS how to setup your project. Plop dozens of
files at once.## Syntax
PlopMD first creates an `ELEMENTS.md` file using the available generators. You
then fill out the elements file with comments, code blocks, and lists. Then run
`plop md` again to generate the files for a that project.### Headings
The elements file sections are defined by Headings. Each level has a different
meaning.- H1: Section titles. These headings are for organization, and are ignored by
the parser.
- H2: Generator names. Each H2 should correspond to an available Plop generator.
- H3: File names. The text content under an H3 will become the value of
`filename` in the Plop generator. Code blocks, lists, and regular paragraphs
are supported.### Other elements
- Code blocks, lists and plain text content at the generator level are added to
the top of each file in order.
- Code blocks, lists and plain text content at the file level are inserted after
generator level content, and in order of appearance.
- Lists and plain text are inserted as multiline comment blocks.
- Code blocks are inserted as inline code.
### Invalid syntax
- If a generator (## heading) does not match an available generator, the
operation will throw.
- If a generator does not match a section, that generator is ignored.
- If a generator section has no files but has some content, it is parsed as a
file with the generator name.
- If a file (### heading) is not under a generator section, the operation will
throw.
- Any content not under a generator (## heading) is ignored.
### Example `ELEMENTS.md` file
A PlopMD elements file looks something like this:
```md
# ELEMENTS for Sample Project## Generator
### `example file name`
```
### Plopfile Usage
```javascript
// plopfile.jsmodule.exports = (plop) => {
plop.load('plop-md/load.js')
}
```### Data provided
```typescript
interface PlopMdData {
/** Full ELEMENTS.md as MD instance */
md: MD
/** Name of file, or H3 */
filename: string
/** Section as MD instance */
section: MD
}
```