Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jgaskins/opal-slim
Sprockets integration to compile Slim templates for Opal apps
https://github.com/jgaskins/opal-slim
Last synced: 2 months ago
JSON representation
Sprockets integration to compile Slim templates for Opal apps
- Host: GitHub
- URL: https://github.com/jgaskins/opal-slim
- Owner: jgaskins
- License: mit
- Created: 2014-12-08T04:12:00.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-14T14:52:49.000Z (over 9 years ago)
- Last Synced: 2024-11-02T13:42:10.321Z (2 months ago)
- Language: Ruby
- Size: 165 KB
- Stars: 13
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-opal - Opal Slim - Sprockets integration to compile Slim templates for Opal apps (Uncategorized / Uncategorized)
README
# Opal-Slim
Opal-Slim is a set of Opal bindings for the Slim templating language, allowing you to use Slim templates in your Opal app. It was written to work with the [Clearwater framework](https://github.com/jgaskins/clearwater), but it should work just fine with any Opal app.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'opal-slim'
```And then execute:
$ bundle
## Usage:
Opal-Slim stores your templates in the global `Template` object, so you simply need to call `Template[template_name].render(context)`, where `context` is the object that will receive the Ruby method calls.
## Contributing
1. Fork it ( https://github.com/[my-github-username]/opal-slim/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request