Sha256: 09a6cd8f69156fea2e3af29b4376496f63448fdcf6e47d2b24c21fde8ee9903e

Contents?: true

Size: 986 Bytes

Versions: 2

Compression:

Stored size: 986 Bytes

Contents

#!/usr/bin/env ruby

help = <<-EOS
MOTE(1)

NAME
       mote -- Minimum Operational Template

SYNOPSIS
       mote FILE [param1 value1 ... paramN valueN]

DESCRIPTION
       Use this command line tool to render mote templates. The result
       is redirected to standard output.

       The extra parameters supplied will be passed to the template.
       Note that all the parameter values will be treated as strings.

EXAMPLES
       If your template is called foo.mote, you can render it with the
       following command:

           mote foo.mote

       To write the result to a new file, just redirect the output:

           mote foo.mote > foo.html

      If the template uses a local variable `bar`, you can pass a
      value from the command line:

           mote foo.mote bar 42

SEE ALSO
       https://github.com/soveran/mote
EOS

if ARGV.size.even?
  puts help
  exit
end

t = ARGV.shift
p = Hash[*ARGV]

require "mote-angular"

include Mote::Helpers

print mote(t, p)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mote-angular-1.1.4 bin/mote-angular
mote-angular-1.1.3 bin/mote-angular