Permalink
Browse files

Fix file selection errors, update command key bindings

Multiple selected directories were not being documented.  Changed
command key bindings to command-control-J to avoid conflicts. Updated
README to reflect new key bindings and show documentation output path.
  • Loading branch information...
1 parent 2170b49 commit 56a7ebcb44f5c954ffda00d14a104eb43e94f7ae @csaccheri committed Sep 6, 2011
Showing with 19 additions and 10 deletions.
  1. +10 −3 Commands/Document with YUI Doc.tmCommand
  2. +1 −1 Commands/View Tag Reference.tmCommand
  3. +8 −6 README.md
@@ -6,11 +6,18 @@
<string>nop</string>
<key>command</key>
<string># documented all selected directories
+files=""
+eval arr=("$TM_SELECTED_FILES")
+for (( i = 0; i &lt; ${#arr[@]}; i++ )); do
+ files="$files ${arr[$i]}"
+done
# if none, run against the entire project
-eval dirs="${TM_SELECTED_FILES:-$TM_PROJECT_DIRECTORY}"
+if [[ -z $files ]]; then
+ files="$TM_PROJECT_DIRECTORY"
+fi
# generate the docs
-"${TM_PYTHON:-python}" "$TM_BUNDLE_SUPPORT/bin/yuidoc/bin/yuidoc.py" $dirs -p "$TM_BUNDLE_SUPPORT/bin/yuidoc/out/docs/parser" -o "$TM_BUNDLE_SUPPORT/bin/yuidoc/out/docs/generator" -t "$TM_BUNDLE_SUPPORT/bin/yuidoc/template" -v 1.0.0 -Y 2
+"${TM_PYTHON:-python}" "$TM_BUNDLE_SUPPORT/bin/yuidoc/bin/yuidoc.py" $files -p "$TM_BUNDLE_SUPPORT/bin/yuidoc/out/docs/parser" -o "$TM_BUNDLE_SUPPORT/bin/yuidoc/out/docs/generator" -t "$TM_BUNDLE_SUPPORT/bin/yuidoc/template" -v 1.0.0 -Y 2
# view the docs
echo "&lt;meta http-equiv='Refresh' content='0; tm-file:///$TM_BUNDLE_SUPPORT/bin/yuidoc/out/docs/generator/index.html'&gt;"</string>
@@ -19,7 +26,7 @@ echo "&lt;meta http-equiv='Refresh' content='0; tm-file:///$TM_BUNDLE_SUPPORT/bi
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
- <string>^@d</string>
+ <string>^@y</string>
<key>name</key>
<string>Document with YUI Doc</string>
<key>output</key>
@@ -9,7 +9,7 @@
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
- <string>^@d</string>
+ <string>^@y</string>
<key>name</key>
<string>View Tag Reference</string>
<key>output</key>
View
@@ -1,6 +1,6 @@
-JS Lint? Check.
-Unit tests? Check.
-Documentation? Umm...
+JS Lint? _Check._
+Unit tests? _Check._
+Documentation? _Umm..._
Don't worry -- documenting your JavaScript can be fun and easy! (Well, maybe just easy.)
@@ -29,10 +29,12 @@ Read the [YUI Doc tag reference][ydop] for a description of each tag and how it'
### Commands
-* **Document with YUI Doc** (⌃⌘D)
-Generates HTML documentation from commented JavaScript source code using YUI Doc 1.0.0b1 and displays it in TextMate's Web Preview window. Select a directory (or multiple directories) to document and then run the command. If no directories are selected, the command will generate documentation for all JS files in the project drawer.
+* **Document with YUI Doc** (⌃⌘Y)
+Generates HTML documentation from commented JavaScript source code using YUI Doc 1.0.0b1 and displays it in TextMate's Web Preview window. Select a directory (or multiple directories) to document and then run the command. If no directories are selected, the command will generate documentation for all JS files in the project drawer.
+You can find the generated documentation in
+`~/Library/Application Support/TextMate/Bundles/YUI Doc.tmbundle/Support/bin/yuidoc/out`
-* **View Tag Reference** (⌃⌘D)
+* **View Tag Reference** (⌃⌘Y)
Opens the [YUI Doc tag reference][ydot] in TextMate's Web Preview window.
## License

0 comments on commit 56a7ebc

Please sign in to comment.