Skip to content
This repository was archived by the owner on May 25, 2018. It is now read-only.

Add bin/hamlbars command #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add bin/hamlbars
kyanny committed Jul 29, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit f53cda1c3bb6ab7efd55a56fcb0e2e59ef2b9c75
17 changes: 17 additions & 0 deletions bin/hamlbars
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env ruby

require 'sprockets'
require 'tilt'
require 'hamlbars'

Tilt.register Hamlbars::Template, 'hamlbars'

input = ARGV.first

template = Tilt['hamlbars'].new(input) {
File.read(input)
}

output = template.render(self)

$stdout.write(output)