Dassets::Erb
Dassets engine to compile dynamic asset files written with ERB.
See Dassets::Erubi for a clone that uses Erubi to do the compilation.
Usage
Register the engine:
# in config/assets.rb
require "dassets"
require "dassets-erb"
Dassets.configure do |c|
c.source "/path/to/assets") do |s|
s.engine "erb", Dassets::Erb::Engine
end
end
Add .erb
to any source files in your source path. Dassets will compile their content using Erb, remove the .erb
extension, and write the output to the output path.
Installation
Add this line to your application's Gemfile:
gem 'dassets-erb'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dassets-erb
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request