Sha256: fc434aadfb52397e47e9eef056d1b74155e476c1e6a0eedd25b84ed17a24292e
Contents?: true
Size: 1.89 KB
Versions: 1
Compression:
Stored size: 1.89 KB
Contents
h1. Sidekick "Sidekick":http://ibuildlegobricks.tumblr.com/post/1398895151/automate-common-tasks-with-sidekick is a command line tool to automatically trigger actions on certain events, as defined per project, in a local @.sidekick@ file in your project folder: <pre><code> watch('**/*.rb') { restart_passenger; rake docs } auto_compile 'assets/*.sass', 'public/:name.css' every(10) { notify sh 'fortune' } </pre></code> h3. Sample use cases * Restart server when code is changed * Auto-compile Sass or CoffeeScript templates (and many other languages) * Periodically run tasks * Continuous testing, notifications, hooks, you name it h3. Features * Simple and powerful DSL * Easy to extend * Compiles many formats, thanks to "Tilt":http://github.com/rtomayko/tilt. * Powered by "EventMachine":http://github.com/eventmachine/eventmachine * Short and sweet codebase - core < 100 loc You can "read the annotated source code":http://jbe.github.com/sidekick/sidekick.html. h2. Basic usage Install with @gem install sidekick@ and invoke the @sidekick@ command in your project folder. If you do not have a @.sidekick@ file, you will be offered a "template":http://github.com/jbe/sidekick/blob/master/lib/template with plenty of examples. View source: * "triggers":http://jbe.github.com/sidekick/triggers.html * "helpers":http://github.com/jbe/sidekick/tree/master/lib/sidekick/helpers/ h2. Defining new triggers Have a look at the "existing triggers":http://jbe.github.com/sidekick/triggers.html, and you will get the idea. Basically, you define new triggers by calling @Sidekick::Triggers.register(:trigger_name) { .. }@, and hooking into EventMachine the same way as in @EM.run { .. }@ from there. You can keep your extensions in the @.sidekick@ file itself, or package them in gems, or (better) ask me to merge them into the main repository. h3. Copyright Copyright (c) 2010 Jostein Berre Eliassen. See LICENSE for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sidekick-0.6.2 | README.textile |