Last active
December 20, 2015 22:09
-
-
Save bencooling/6202931 to your computer and use it in GitHub Desktop.
Ruby, Gem & Guard
This file contains hidden or 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
| # Gem | |
| # --- | |
| # environment deats i.e.location of gem packages | |
| gem env |
This file contains hidden or 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
| # Guard | |
| ------- | |
| gem install guard | |
| gem install guard-sass | |
| gem install guard-livereload | |
| gem install guard-shell | |
| # Create Guardfile in project | |
| guard init | |
| # Run guard server | |
| guard | |
| # List all guard plugins | |
| gem search -r guard- |
This file contains hidden or 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
| ignore /built\.js/ | |
| guard 'shell' do | |
| watch(/script\/(.*).js/) { `node r.js -o build.js` } | |
| end | |
| guard 'shell' do | |
| watch(/sass\/(.*).scss/) { `sass style/style.scss:style/style.css` } | |
| end | |
| # Use guard sass only for single scss files. This outputs to current directory | |
| #guard 'sass', :output => './' do | |
| # watch %r{style.scss} | |
| #end | |
| guard 'livereload', :grace_period =>0, :override_url=>'http://csv-editor.dev' do | |
| watch(%r{templates/.+\.mustache$}) | |
| watch(%r{script/.+\.js}) { "script/built.js" } | |
| watch(%r{style/.+\.css}) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment