Coder Social home page Coder Social logo

erbmash's Introduction

erbmash

erbmash is a minimal wrapper around mruby-erb and mruby-yaml using the go-mruby bindings. It allows you to mash json or yaml input and erb templates together without a ruby runtime.

It is intended t be used in conjunction with other tools to provide the json or yaml data (e.g. etcdctl, consul, web services or manually written config).

Watch behaviour similar to confd should be possible using these external tools but I haven't played with that. A PR (or an issue if it's not possible) with examples would be appreciated if it works!

Usage

Usage is pretty simple: erbmash --data some_json_or_yaml_file --erb some_erb_file

See the examples directory for examples of templates.

Plans

I don't want to scope creep too much as the premise of the tool is really do one thing well.

Support may be added for the following:

  • Producing several output files from a single run
  • Encode json / yaml

Building

You will need docker, Go 1.6+, make and govendor installed. Note that the actual build happens in a docker container so no other host deps should be required.

go get -d github.com/mikesimons/go-mruby
govendor update github.com/mikesimons/go-mruby
make

License

License is standard MIT. See LICENSE.md for specifics.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.