visionmedia-bind 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +28 -2
- data/Todo.rdoc +1 -1
- data/bin/bind +1 -1
- data/bind.gemspec +1 -1
- data/lib/bind/version.rb +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -5,9 +5,35 @@ Bind actions to various file system events, helping aid in
|
|
5
5
|
automation of tasks such as refreshing browser(s) when you
|
6
6
|
update a css / sass / js file.
|
7
7
|
|
8
|
-
==
|
8
|
+
== Executable
|
9
9
|
|
10
|
-
|
10
|
+
The 'bind' executable allows you to perform arbitrary actions
|
11
|
+
based on several events. Currently only the change (mtime) event
|
12
|
+
is supported.
|
13
|
+
|
14
|
+
Bind to a single file, outputting its path when changed
|
15
|
+
$ bind to style.css -e 'puts file.path'
|
16
|
+
|
17
|
+
Refresh Safari, and Firefox in the background to the uri specified when
|
18
|
+
style.css or reset.css are modified.
|
19
|
+
$ bind refresh http://localhost/page --files style.css,reset.css --browsers Safari,Firefox
|
20
|
+
|
21
|
+
Refresh local static html when the style you are working on is modified.
|
22
|
+
$ bind refresh examples/demo.html -f style.css -b Safari
|
23
|
+
|
24
|
+
== Library
|
25
|
+
|
26
|
+
Bind of course supplies a Ruby library as well, which provides the same
|
27
|
+
functionality as the executable above.
|
28
|
+
|
29
|
+
|
30
|
+
Refresh Safari and Firefox, using the RefreshBrowsersHaml action, whenever a haml or
|
31
|
+
sass file is modified, it will be compiled to '..' (up a directory) preceding the refresh.
|
32
|
+
|
33
|
+
path = 'http://localhost'
|
34
|
+
action = Bind::Actions::RefreshBrowsersHaml.new path, '..', 'Safari', 'Firefox'
|
35
|
+
listener = Bind::Listener.new :interval => 1, :debug => $stdout, :action => action, :files => Dir['*.haml'] + Dir['*.sass']
|
36
|
+
listener.run!
|
11
37
|
|
12
38
|
== License:
|
13
39
|
|
data/Todo.rdoc
CHANGED
data/bin/bind
CHANGED
@@ -14,7 +14,7 @@ command :to do |c|
|
|
14
14
|
c.syntax = 'bind to <file> [file ...] [options] '
|
15
15
|
c.summary = 'Bind to modification of a file'
|
16
16
|
c.description = 'Bind to modification of a file or all files within a directory.'
|
17
|
-
c.example 'Bind to a single file, logging its path when changed', "bind
|
17
|
+
c.example 'Bind to a single file, logging its path when changed', "bind to style.css -e 'puts file'"
|
18
18
|
c.option '-e', '--eval STRING', String, 'Evaluate a string of Ruby in context of Bind, so the file local variable is available.'
|
19
19
|
c.when_called do |args, options|
|
20
20
|
populate_common_options options
|
data/bind.gemspec
CHANGED
data/lib/bind/version.rb
CHANGED