Ruby on Rails
To install Emblem on a Rails 3 project, just use add the following lines to your
Define your templates in
For a working sample project, check out:
You can easily test Emblem in the browser (works great for sites like jsbin.com) by just including the Emblem compiler script and wrapping your Emblem templates with
Your emblem script tags can also include
See a working JSBin demo here.
<!-- Step 1: Add Emblem.js --> <script src="https://github.com/machty/emblem.js/raw/master/dist/emblem.js"></script> <!-- Step 2: define templates --> <script type="text/x-emblem" data-template-name="application"> h1 Welcome to my App = outlet </script>
Follow these instructions to get started with Brunch.
Grunt (and Yeoman)
Follow these instructions to get started with Grunt.
Emblem is supported in Mimosa since version 0.10.1.
Follow these instructions to get started with Mimosa.
Once you’re setup, files ending in .emblem or .embl will be compiled as Emblem templates. If you’ve enabled Ember in your project, they’ll be compiled as Ember-ized templates.
Ember Tools support coming soon!
MeteorJS support coming soon!
At the moment, you can use vim-emblem or sublime-emblem-syntax for Emblem syntax highlighting, but if you use a different editor, Emblem.js is close enough to Slim that you can reuse most of the editor tools for Slim.
# vim-emblem Follow the instructions at https://github.com/heartsentwined/vim-emblem # Sublime Text 2 Follow the instructions at https://github.com/johanobergman/sublime-emblem-syntax # Textmate 1.x cd ~/Library/Application\ Support/TextMate/Bundles/ git clone git://github.com/slim-template/ruby-slim.tmbundle.git Ruby\ Slim.tmbundle osascript -e 'tell app "TextMate" to reload bundles' # Textmate 2.x cd ~/Library/Application\ Support/TextMate/Managed/Bundles/ git clone git://github.com/slim-template/ruby-slim.tmbundle.git Ruby\ Slim.tmbundle # Vim users with Slim Syntax highlighting au BufNewFile,BufRead *.emblem set filetype=slim