goliatone / slv

CLI template expansion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slv

CLI template solver

Getting Started

Install the module with: npm install slv -g

 NODE_ENV=local NODE_USERNAME=peperone NODE_PASSWORD=shh slv examples/Dockerfile
slv examples/template.html -c examples/context.json

Use with envset:

envset production -- slv Dockerfile

Documentation

(Coming soon)

TODO

  • Take raw strings from CLI
  • take context from CLI

Examples

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2015 goliatone
Licensed under the MIT license.

#!/usr/bin/env node

var i = require('interpolate');

var options = { delimiter: '{{}}' };

var processLine = function(line){ console.log(i(line, process.env, options)); };

process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(data){ processLine(data); });

About

CLI template expansion

License:MIT License


Languages

Language:JavaScript 97.0%Language:Shell 3.0%