Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/izumin5210/scaffold

Customizable templates generator, inspired by Rails
https://github.com/izumin5210/scaffold

generator golang scaffolding

Last synced: 30 days ago
JSON representation

Customizable templates generator, inspired by Rails

Awesome Lists containing this project

README

        

# scaffold
[![Build Status](https://travis-ci.org/izumin5210/scaffold.svg?branch=master)](https://travis-ci.org/izumin5210/scaffold)
[![Coverage Status](https://coveralls.io/repos/github/izumin5210/scaffold/badge.svg)](https://coveralls.io/github/izumin5210/scaffold)
[![MIT License](https://img.shields.io/github/license/izumin5210/scaffold.svg)][license]
[![Version](https://img.shields.io/github/release/izumin5210/scaffold.svg)](./releases)

[![https://gyazo.com/756d165b512a3d93c08e2094eedecd86](https://i.gyazo.com/756d165b512a3d93c08e2094eedecd86.gif)](https://gyazo.com/756d165b512a3d93c08e2094eedecd86)

## Usage
### Example

[`.scaffold`](./.scaffold)

```
$ tree .scaffold
.scaffold
├── command
│ ├── app
│ │ └── cmd
│ │ ├── {{name}}.go
│ │ └── {{name}}_test.go
│ └── meta.toml
└── usecase
├── app
│ └── usecase
│ ├── {{name}}.go
│ └── {{name}}_test.go
└── meta.toml

$ scaffold g command destroy
exist .
exist app/cmd
create app/cmd/destroy.go
create app/cmd/destroy_test.go

$ ls app/cmd/destroy*
app/cmd/destroy.go
app/cmd/destroy_test.go
```

### Available filters

- `toUpper`
- `toLower`
- `camelizer`
- `pascalize`
- `underscore`
- `dasherize`

## Installation
### macOS
Homebrew formula is available at [izumin5210/homebrew-tools](https://github.com/izumin5210/homebrew-tools)

```
$ brew install izumin5210/tools/scaffold
```

### Other platforms
Prebuilt binary is available at [Releases](https://github.com/izumin5210/scaffold/releases)

## Development

```
# install dependencies
$ make deps

# build
$ make build

# run lint and test
$ make test
```

## License
Licensed under [MIT License][license].

[license]: ./LICENSE