https://github.com/narven/blueprint
Blueprint is a command line tool to help you scaffold any files/folders structure based on blueprints written in yaml.
https://github.com/narven/blueprint
binary filesystem golang scaffold tool
Last synced: about 1 month ago
JSON representation
Blueprint is a command line tool to help you scaffold any files/folders structure based on blueprints written in yaml.
- Host: GitHub
- URL: https://github.com/narven/blueprint
- Owner: Narven
- Created: 2021-02-08T02:38:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-10T00:44:09.000Z (over 5 years ago)
- Last Synced: 2025-01-20T00:55:51.237Z (over 1 year ago)
- Topics: binary, filesystem, golang, scaffold, tool
- Language: Go
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# blueprint
> Blueprint is a command line tool to help you scaffold any files/folders structure based on blueprints written in yaml.
## Download
Just download one of the existing [releases](https://github.com/Narven/blueprint/releases) into you path.
# Usage
Create a minimal yaml file called `simple.yml` and paste the following snippet.
```yml
version: 1
name: Simple Blueprint
path: dist/simple
structure:
- FolderFoo
- FolderBar
- README.md: |
# My Project generated by Blueprint v1
- .gitignore: |
.DS_STORE
yarn.log
package-lock.json
- Makefile:
- .editorconfig:
```
run command:
```bash
blueprint generate -t simple.yml
```
This will generate a folder/file structure based on what was defined in the yml, inside `dist` folder.
Something like this:
```bash
├── FolderBar
├── FolderFoo
├── .editorconfig
├── .gitignore
├── Makefile
└── README.md
```
### Another example
```yml
version: 1
name: Test1
path: apps/api/internal/calendar
structure:
- delivery
- dtos
- repository
- usecase
- delivery.go: |
package calendar
type Handlers interface {
}
- repository.go: |
package calendar
type Repository interface {
}
- usecase.go: |
package calendar
type UseCase interface {
}
```
## Releases
`make version= release`
## TODO
* [x] Generate basic folder/file structure (1 level deep)
* [ ] Generate multi level folder/file structure
* [ ] Pass path name using args to replace the one from yml
* [ ] Use flags + template system to be to pass variables into the yml file, to make it more dynamic
* [ ] Create tests and add them to CI
* [ ] Better validation and error reporting
* [ ] Add --dry-run
* [ ] Be able to import external template files for the files contents