abusing guard for build

32 views
Skip to first unread message

4null4

unread,
Jul 20, 2012, 5:11:12 AM7/20/12
to guar...@googlegroups.com

hello!

i'd like to 'abuse guard' to build my project. on changes it works that well. so i ask myself if there is any posibility to get stuff done initially over all existing files. 

normally i am not a ruby-guy and using grunt.js for building my project. but since guard is much better as watching 'manually' at my files i started to using it. so i'd like to init my project with compiling coffee, haml and all the stuff, when i am starting guard (with arguments)

Does anybody has any ideas how to do it? Is this a usefull 'Feature request'?

thanks a lot!

Rémy Coutable

unread,
Jul 20, 2012, 5:18:21 AM7/20/12
to guar...@googlegroups.com
Hi,

Sorry I didn't get right what you wanted to achieve (in the GitHub issue)!

Some Guard plugins have an :all_on_start option for that but not all, unfortunately.

So, as @netzpirat said, you could just call Guard.run_all at the end of your Guardfile so it'd be executed when the Guardfile is evaluated, like

--- in your Guardfile
guard :coffeescript, input: 'src', output: 'lib'

::Guard.run_all({})
---------------------

I hope that helps! And let us know how it goes.

Rémy

4null4

unread,
Jul 20, 2012, 6:24:21 AM7/20/12
to guar...@googlegroups.com

Yeah, that was what i was looking for. Thanks a lot.
Maybe i should try to do a pull request on the docs ...

Rémy Coutable

unread,
Jul 20, 2012, 5:25:01 PM7/20/12
to guar...@googlegroups.com
Please feel free to add your use case in the Guard Cookbook (in the wiki): https://github.com/guard/guard/wiki/Guard-Cookbook

Rémy
Reply all
Reply to author
Forward
0 new messages