Last active
January 4, 2016 07:49
-
-
Save sohocoke/8590928 to your computer and use it in GitHub Desktop.
brunch config snippet to enable slim compilation on save.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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