https://github.com/atomicojs/scaffold
https://github.com/atomicojs/scaffold
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/atomicojs/scaffold
- Owner: atomicojs
- Created: 2021-11-26T04:32:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-18T03:04:37.000Z (about 3 years ago)
- Last Synced: 2024-10-29T10:13:26.902Z (over 1 year ago)
- Language: JavaScript
- Size: 976 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## @atomico/scaffold
CLI that generates files from markdown documents
### Install
```bash
npm i @atomico/scaffold
```
## use from package.json#scripts
Add script to package.json
```json
{
"scripts": {
"create-component": "scaff template/component-jsx src"
}
}
```
## use from npx
```bash
scaff template/component-jsx src
```
## Markdown
The files are created according to the markdown file associated with the CLI, all the code blocks that declare the path will be created only if the document does not exist, example:
````md
---
{
data: { name: "Upper Cod" },
questions: [{ type: "text", name: "name", message: "Component name?" }],
}
---
## bla bla..
```js tests/build/<>.js
const data = {"<>":10};
const <> = 10;
const <> = 10;
```
Bla bla..
```css tests/build/<>.css
:host {
display: block;
}
```
````
The CLI uses [Prompts](https://www.npmjs.com/package/prompts) for the use of questions