Skip to content
s0berPublic

About

Haml to Slim converter, written in coffeescript...

Resources

Stars

9 stars

Watchers

1 watching

Forks

Latest commit

 

History

80 Commits

Folders and files

Repository files navigation

Slimmy

Build Status

Usage

Create slimmy instance.

Slimmy = require 'slimmy'
slimmy = new Slimmy()

You then can convert file.

slimmy.convertFile('~/my_rails_app/app/views/layouts/application.html.haml')

Or the whole directory (recursively).

slimmy.convertDir('~/my_rails_app/app/views/')

Or just a string.

filePath = '~/my_rails_app/app/views/layouts/application.html.haml'
hamlString = require('fs').readFileSync(filePath).toString()

slimmy.convertString(hamlString).then (compiler) ->
  # then we can access compiler's buffer
  console.log(compiler.buffer)

Development

Prepare development environment: install haml, install node packages.

gem install haml
npm install -g gulp
npm install -g coffeegulp
npm install

Run tests in development mode.

coffeegulp mocha:dev

Code!

About

Haml to Slim converter, written in coffeescript...

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages