Skip to content

Instantly share code, notes, and snippets.

@sohocoke
Last active January 4, 2016 07:49
Show Gist options
  • Save sohocoke/8590928 to your computer and use it in GitHub Desktop.
Save sohocoke/8590928 to your computer and use it in GitHub Desktop.
brunch config snippet to enable slim compilation on save.
# add the afterBrunch npm package and setup afterBrunch like the following.
plugins:
afterBrunch: [
''' # compile slim files
ruby <<EOF
path = 'app'
Dir.glob("app/**/*.slim")do |file|
target = file.gsub( /\.slim$/, '').gsub(%r(^app\/assets), '_public')
system "slimrb #{file} #{target}"
end
EOF
'''
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment