Sibilant Ruby Gem
This is a ruby wrapper for the sibilant compiler, which is written in javascript. It expects to find NodeJS available on the path as node. Sibilant doesn't need to be installed.
Tilt support
Tilt support is provided by sibilant/tilt
:
require 'sibilant/tilt'
Tilt['test.sibilant'].new { "(+ 1 2 3)" }.render #=> '(1 + 2 + 3)'
Sinatra
Sinatra support is provided by sibilant/sinatra
:
require 'sinatra'
require 'sibilant/sinatra'
helpers Sinatra::Sibilant
get('/inline.js') { sibilant "(alert 'here)" }
#./views/templated.sibilant
get('/templated.js') { sibilant :templated }
How to install
First, you'll need NodeJS installed.
Add this line to your application's Gemfile:
gem 'sibilant'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sibilant
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request