Last active
December 24, 2015 14:39
-
-
Save andrexduarte/6814315 to your computer and use it in GitHub Desktop.
Guard para automatizar tarefas.
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
group :frontend do | |
guard 'shell' do | |
watch %r{.+\.(scss|sass)} do |file| | |
n file[0], "#{file[0]} changed" | |
`compass compile --sourcemap` | |
end | |
end | |
# Image optimization | |
guard 'shell' do | |
watch %r{^images/.} do |file| | |
n file[0], "#{file[0]} changed" | |
`open #{file[0]} -a ImageOptim` | |
end | |
end | |
end | |
group :concat do | |
guard 'shell' do | |
watch %r{^js/main.js} do |file| | |
n file[0], "#{file[0]} changed" | |
`juicer merge js/app.js js/vendor/* js/main.js --force -s` | |
end | |
end | |
end | |
group :linter do | |
# # JsHint | |
# # JsHint Install | |
# # npm install jshint | |
# # npm install --save-dev jshint-stylish | |
# guard 'shell' do | |
# watch %r{js/main.js} do |file| | |
# n file[0], "#{file[0]} changed" | |
# #`jshint --reporter node_modules/jshint-stylish/stylish.js js/main.js` | |
# end | |
# end | |
guard 'shell' do | |
watch %r{.+\.(scss|sass)} do |file| | |
n file[0], "#{file[0]} changed" | |
`scss-lint sass/ --exclude sass/third-party/*` | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment