Skip to content

Commit

Permalink
Site generation build step and documentation updates to support it (f…
Browse files Browse the repository at this point in the history
…ixes #478)
  • Loading branch information
nzakas committed Jan 18, 2014
1 parent 6478b85 commit eb89215
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
15 changes: 15 additions & 0 deletions Makefile.js
Expand Up @@ -105,6 +105,21 @@ target.docs = function() {
echo("Documentation has been output to /jsdoc");
};

target.gensite = function() {

cp("-rf", "docs/*", "../eslint.github.io/docs");

find("../eslint.github.io/docs").forEach(function(filename) {
if (test("-f", filename)) {
var text = cat(filename);
text = "---\ntitle: ESLint\nlayout: doc\n---\n" + text;
text.replace(/.md\)/g, ".html)").replace("README.html", "index.html").to(filename.replace("README.md", "index.md"));
}
});


};

target.changelog = function() {

// get most recent two tags
Expand Down
2 changes: 0 additions & 2 deletions docs/README.md
@@ -1,5 +1,3 @@
# Home

## [About](about/)

Learn more about ESLint and why it came about and the general philosophy behind it.
Expand Down
2 changes: 2 additions & 0 deletions docs/developer-guide/working-with-rules.md
Expand Up @@ -75,12 +75,14 @@ In this way, you can look for patterns in the JavaScript text itself when the AS
### Accessing comments

To get a list of all comments simply call `context.getAllComments()`:

```js
// get all comments for the program
var allComments = context.getAllComments();
```

If you need to access comments for a specific node you can use `context.getComments(node)`:

```js
// the "comments" variable has a "leading" and "trailing" property containing
// its leading and trailing comments, respectively
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/README.md
Expand Up @@ -103,7 +103,7 @@ These rules are purely matters of style and are quite subjective.
* [sort-vars](sort-vars.md) - sort variables within the same declaration block
* [space-infix-ops](space-infix-ops.md) - require spaces around operators
* [space-return-throw-case](space-return-throw-case.md) - require a space after `return`, `throw`, and `case`
* [space-unary-word-ops](space-unary-word.ops) - require a space around word operators such as `typeof`
* [space-unary-word-ops](space-unary-word-ops.md) - require a space around word operators such as `typeof`
* [max-nested-callbacks](max-nested-callbacks.md) - specify the maximum depth callbacks can be nested
* [one-var](one-var.md) - allow just one var statement per function
* [wrap-regex](wrap-regex.md) - require regex literals to be wrapped in parentheses
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -13,6 +13,7 @@
"patch": "node Makefile.js patch",
"minor": "node Makefile.js minor",
"major": "node Makefile.js major",
"gensite": "node Makefile.js gensite",
"bundle": "bash scripts/bundle.sh"
},
"files": [
Expand Down

0 comments on commit eb89215

Please sign in to comment.