Permalink
Browse files

Doc Updates

  • Loading branch information...
davglass committed Jun 4, 2012
1 parent fe7523f commit 80a704c0fe5d9f1e9d10e6b05559e9ecc4a40641
View
@@ -13,6 +13,7 @@ doc:
clean:
rm -rRf ./output/*
npm update
+ npm i selleck
api:
./lib/cli.js
@@ -693,9 +693,9 @@ if this is not provided.
A `@return` tag has the structure `@return {type} description`.
The `{type}` is optional.</p>
- <p>If a return value is an object with a complex structure,
+ <!--p>If a return value is an object with a complex structure,
you can <a href="#param">nest `@param` tags</a>
- underneath the `@return` value.</p>
+ underneath the `@return` value.</p-->
<p>
See also:
@@ -315,7 +315,7 @@ <h3 class="name"><code>copyAssets</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l319"><code>lib&#x2F;files.js:319</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l335"><code>lib&#x2F;files.js:335</code></a>
</p>
@@ -465,7 +465,7 @@ <h3 class="name"><code>copyDirectory</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l21"><code>lib&#x2F;files.js:21</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l37"><code>lib&#x2F;files.js:37</code></a>
</p>
@@ -617,7 +617,7 @@ <h3 class="name"><code>copyFile</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l98"><code>lib&#x2F;files.js:98</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l114"><code>lib&#x2F;files.js:114</code></a>
</p>
@@ -786,7 +786,7 @@ <h3 class="name"><code>copyPath</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l141"><code>lib&#x2F;files.js:141</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l157"><code>lib&#x2F;files.js:157</code></a>
</p>
@@ -946,7 +946,7 @@ <h3 class="name"><code>deletePath</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l188"><code>lib&#x2F;files.js:188</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l204"><code>lib&#x2F;files.js:204</code></a>
</p>
@@ -1040,7 +1040,7 @@ <h3 class="name"><code>getJSON</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l367"><code>lib&#x2F;files.js:367</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l383"><code>lib&#x2F;files.js:383</code></a>
</p>
@@ -1150,7 +1150,7 @@ <h3 class="name"><code>isDirectory</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l212"><code>lib&#x2F;files.js:212</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l228"><code>lib&#x2F;files.js:228</code></a>
</p>
@@ -1276,7 +1276,7 @@ <h3 class="name"><code>isFile</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l239"><code>lib&#x2F;files.js:239</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l255"><code>lib&#x2F;files.js:255</code></a>
</p>
@@ -1396,7 +1396,7 @@ <h3 class="name"><code>isSymbolicLink</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l265"><code>lib&#x2F;files.js:265</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l281"><code>lib&#x2F;files.js:281</code></a>
</p>
@@ -1500,7 +1500,7 @@ <h3 class="name"><code>lstatSync</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l277"><code>lib&#x2F;files.js:277</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l293"><code>lib&#x2F;files.js:293</code></a>
</p>
@@ -1605,7 +1605,7 @@ <h3 class="name"><code>statSync</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l298"><code>lib&#x2F;files.js:298</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l314"><code>lib&#x2F;files.js:314</code></a>
</p>
@@ -1718,7 +1718,7 @@ <h3 class="name"><code>writeFile</code></h3>
- <a href="..&#x2F;files&#x2F;lib_files.js.html#l381"><code>lib&#x2F;files.js:381</code></a>
+ <a href="..&#x2F;files&#x2F;lib_files.js.html#l397"><code>lib&#x2F;files.js:397</code></a>
</p>
View
@@ -1365,7 +1365,7 @@
},
{
"file": "lib/files.js",
- "line": 21,
+ "line": 37,
"description": "Copy a directory from one location to another",
"itemtype": "method",
"name": "copyDirectory",
@@ -1398,7 +1398,7 @@
},
{
"file": "lib/files.js",
- "line": 98,
+ "line": 114,
"description": "Copy a file from one location to another",
"itemtype": "method",
"name": "copyFile",
@@ -1438,7 +1438,7 @@
},
{
"file": "lib/files.js",
- "line": 141,
+ "line": 157,
"description": "If _source_ is a file, copies it to _dest_. If it's a directory, recursively\ncopies it and all files and directories it contains to _dest_.\n\nNote that when attempting to copy a file into a directory, you should specify\nthe full path to the new file (including the new filename). Otherwise, it will\nbe interpreted as an attempt to copy the _source_ file *over* the _dest_\ndirectory instead of *into* it.\n\nKnown issues:\n- Doesn't preserve ownership or permissions on copied files/directories.",
"itemtype": "method",
"name": "copyPath",
@@ -1478,7 +1478,7 @@
},
{
"file": "lib/files.js",
- "line": 188,
+ "line": 204,
"description": "If _path_ is a file, deletes it. If _path_ is a directory, recursively deletes\nit and all files and directories it contains.\n\nThis method is synchronous.",
"itemtype": "method",
"name": "deletePath",
@@ -1494,7 +1494,7 @@
},
{
"file": "lib/files.js",
- "line": 212,
+ "line": 228,
"description": "Check to see if this is a directory",
"itemtype": "method",
"name": "isDirectory",
@@ -1521,7 +1521,7 @@
},
{
"file": "lib/files.js",
- "line": 239,
+ "line": 255,
"description": "Check to see if this is a File",
"itemtype": "method",
"name": "isFile",
@@ -1548,7 +1548,7 @@
},
{
"file": "lib/files.js",
- "line": 265,
+ "line": 281,
"description": "Check to see if this is a SymLink",
"itemtype": "method",
"name": "isSymbolicLink",
@@ -1568,7 +1568,7 @@
},
{
"file": "lib/files.js",
- "line": 277,
+ "line": 293,
"description": "Like `fs.lstatSync()`, but returns `null` instead of throwing when _path_\ndoesn't exist. Will still throw on other types of errors.",
"itemtype": "method",
"name": "lstatSync",
@@ -1588,7 +1588,7 @@
},
{
"file": "lib/files.js",
- "line": 298,
+ "line": 314,
"description": "Like `fs.statSync()`, but returns `null` instead of throwing when _path_\ndoesn't exist. Will still throw on other types of errors.",
"itemtype": "method",
"name": "statSync",
@@ -1608,7 +1608,7 @@
},
{
"file": "lib/files.js",
- "line": 319,
+ "line": 335,
"description": "Copy the theme assets directory",
"itemtype": "method",
"name": "copyAssets",
@@ -1639,7 +1639,7 @@
},
{
"file": "lib/files.js",
- "line": 367,
+ "line": 383,
"description": "Helper method for getting JSON data from a local file",
"itemtype": "method",
"name": "getJSON",
@@ -1659,7 +1659,7 @@
},
{
"file": "lib/files.js",
- "line": 381,
+ "line": 397,
"description": "Helper method for writing files to disk. It wraps the NodeJS file API",
"itemtype": "method",
"name": "writeFile",
@@ -230,7 +230,7 @@ <h1 class="file-heading">File: lib&#x2F;builder.js</h1>
_addHelpers: function(helpers) {
Y.log(&#x27;Importing helpers: &#x27; + helpers, &#x27;info&#x27;, &#x27;builder&#x27;);
helpers.forEach(function(imp) {
- if (!path.existsSync(imp) || path.existsSync(path.join(process.cwd(), imp))) {
+ if (!Y.Files.exists(imp) || Y.Files.exists(path.join(process.cwd(), imp))) {
imp= path.join(process.cwd(), imp);
}
var h = require(imp);
@@ -553,12 +553,12 @@ <h1 class="file-heading">File: lib&#x2F;builder.js</h1>
try {
var meta,
theme = path.join(themeDir, &#x27;theme.json&#x27;);
- if (path.existsSync(theme)) {
+ if (Y.Files.exists(theme)) {
Y.log(&#x27;Loading theme from &#x27; + theme, &#x27;info&#x27;, &#x27;builder&#x27;);
meta = Y.Files.getJSON(theme);
} else if (DEFAULT_THEME !== themeDir) {
theme = path.join(DEFAULT_THEME, &#x27;theme.json&#x27;)
- if (path.existsSync(theme)) {
+ if (Y.Files.exists(theme)) {
Y.log(&#x27;Loading theme from &#x27; + theme, &#x27;info&#x27;, &#x27;builder&#x27;);
meta = Y.Files.getJSON(theme);
}
@@ -775,7 +775,7 @@ <h1 class="file-heading">File: lib&#x2F;builder.js</h1>
dirs.push(&#x27;json&#x27;);
}
var writeRedirect = function(dir, file, cb) {
- path.exists(file, function(x) {
+ Y.Files.exists(file, function(x) {
if (x) {
var out = path.join(dir, &#x27;index.html&#x27;);
fs.createReadStream(file).pipe(fs.createWriteStream(out));
@@ -788,7 +788,7 @@ <h1 class="file-heading">File: lib&#x2F;builder.js</h1>
Y.log(&#x27;Making default directories: &#x27; + dirs.join(&#x27;,&#x27;), &#x27;info&#x27;, &#x27;builder&#x27;);
dirs.forEach(function(d) {
var dir = path.join(self.options.outdir, d);
- path.exists(dir, stack.add(function(x) {
+ Y.Files.exists(dir, stack.add(function(x) {
if (!x) {
fs.mkdir(dir, 0777, stack.add(function() {
writeRedirect(dir, defaultIndex, stack.add(noop));
@@ -118,6 +118,7 @@ <h1 class="file-heading">File: lib&#x2F;files.js</h1>
Y.Files = {};
+
&#x2F;*
Selleck
Copyright (c) 2011 Yahoo! Inc.
@@ -126,7 +127,22 @@ <h1 class="file-heading">File: lib&#x2F;files.js</h1>
var fs = require(&#x27;graceful-fs&#x27;);
fsPath = require(&#x27;path&#x27;),
- nodeUtil = require(&#x27;util&#x27;);
+ nodeUtil = require(&#x27;util&#x27;),
+ useFS = (fs.exists) ? fs : fsPath;
+
+
+
+
+var exists = function(file, cb) {
+ if (cb) {
+ useFS.exists(file, cb);
+ } else {
+ return useFS.existsSync(file);
+ }
+};
+
+Y.Files.exists = exists;
+
&#x2F;**
* Copy a directory from one location to another
@@ -482,7 +498,7 @@ <h1 class="file-heading">File: lib&#x2F;files.js</h1>
*&#x2F;
Y.Files.getJSON = function(filename) {
var data = {};
- if (fsPath.existsSync(filename)) {
+ if (exists(filename)) {
data = JSON.parse(fs.readFileSync(filename, &quot;utf8&quot;));
};
return data;
@@ -286,7 +286,7 @@ <h1 class="file-heading">File: lib&#x2F;yuidoc.js</h1>
if (ext in self.options.extensions) {
fullpath = path.join(dir, filename);
- if (path.existsSync(fullpath)) {
+ if (Y.Files.exists(fullpath)) {
self.filecount++;
text = fs.readFileSync(fullpath, &quot;utf8&quot;);
@@ -309,7 +309,7 @@ <h1 class="file-heading">File: lib&#x2F;yuidoc.js</h1>
base = path.dirname(fullpath);
comp = path.join(base, &#x27;..&#x2F;&#x27;, &#x27;docs&#x27;, &#x27;component.json&#x27;);
&#x2F;&#x2F;Y.log(&#x27;Checking for Selleck data: &#x27; + comp, &#x27;info&#x27;, &#x27;yuidoc&#x27;);
- if (path.existsSync(comp)) {
+ if (Y.Files.exists(comp)) {
try {
var json = JSON.parse(fs.readFileSync(comp, &#x27;utf8&#x27;));
delete json.examples; &#x2F;&#x2F;Remove the selleck example data, we only want the comp info
@@ -360,11 +360,11 @@ <h1 class="file-heading">File: lib&#x2F;yuidoc.js</h1>
if (self.options.writeJSON) {
&#x2F;&#x2F; Y.log(Y.JSON.stringify(parser.data, null, 4));
var file = path.join(self.options.outdir, &#x27;data.json&#x27;), out;
- if (path.existsSync(self.options.outdir) &amp;&amp; !self.options.nodeleteout) {
+ if (Y.Files.exists(self.options.outdir) &amp;&amp; !self.options.nodeleteout) {
Y.log(&#x27;Found out dir, deleting: &#x27; + self.options.outdir, &#x27;warn&#x27;, &#x27;yuidoc&#x27;);
rimraf.sync(self.options.outdir);
}
- if (!path.existsSync(self.options.outdir)) {
+ if (!Y.Files.exists(self.options.outdir)) {
Y.log(&#x27;Making out dir: &#x27; + self.options.outdir, &#x27;info&#x27;, &#x27;yuidoc&#x27;);
try {
fs.mkdirSync(self.options.outdir, 0777);
Oops, something went wrong.

0 comments on commit 80a704c

Please sign in to comment.