Skip to content

Narven/blueprint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 into you path.

# Usage

Create a minimal yaml file called simple.yml and paste the following snippet.

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:

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:

├── FolderBar
├── FolderFoo
├── .editorconfig
├── .gitignore
├── Makefile
└── README.md

Another example

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=<version> release

TODO

  • 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

About

Blueprint is a command line tool to help you scaffold any files/folders structure based on blueprints written in yaml.

Topics

Resources

Stars

Watchers

Forks