Skip to content

Commit

Permalink
Build: Add JSDoc generation (fixes eslint#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Jan 24, 2015
1 parent f46d4f5 commit 6458979
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ npm-debug.log
.DS_Store
tmp/
.idea
jsdoc/
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- "0.10"
script: "npm test && npm run docs"
after_success:
- npm run coveralls
12 changes: 6 additions & 6 deletions lib/token-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function(tokens) {
* Gets tokens in a given interval.
* @param {int} start Inclusive index of the first token. 0 if negative.
* @param {int} end Exclusive index of the last token.
* @returns {[Token]} Tokens in the interval.
* @returns {Token[]} Tokens in the interval.
*/
function get(start, end) {
var result = [],
Expand Down Expand Up @@ -70,7 +70,7 @@ module.exports = function(tokens) {
* Gets a number of tokens that precede a given node's tokens in the token stream.
* @param {ASTNode} node The AST node.
* @param {int} [beforeCount=0] The number of tokens before the node to retrieve.
* @returns {[Token]} Array of objects representing tokens.
* @returns {Token[]} Array of objects representing tokens.
*/
api.getTokensBefore = function(node, beforeCount) {
var first = starts[node.range[0]];
Expand All @@ -91,7 +91,7 @@ module.exports = function(tokens) {
* Gets a number of tokens that precede a given node's tokens in the token stream.
* @param {ASTNode} node The AST node.
* @param {int} [afterCount=0] The number of tokens after the node to retrieve.
* @returns {[Token]} Array of objects representing tokens.
* @returns {Token[]} Array of objects representing tokens.
*/
api.getTokensAfter = function(node, afterCount) {
var start = lastTokenIndex(node) + 1;
Expand All @@ -113,7 +113,7 @@ module.exports = function(tokens) {
* @param {ASTNode} node The AST node.
* @param {int} [beforeCount=0] The number of tokens before the node to retrieve.
* @param {int} [afterCount=0] The number of tokens after the node to retrieve.
* @returns {[Token]} Array of objects representing tokens.
* @returns {Token[]} Array of objects representing tokens.
*/
api.getTokens = function(node, beforeCount, afterCount) {
return get(
Expand All @@ -126,7 +126,7 @@ module.exports = function(tokens) {
* Gets the first `count` tokens of the given node's token stream.
* @param {ASTNode} node The AST node.
* @param {int} [count=0] The number of tokens of the node to retrieve.
* @returns {[Token]} Array of objects representing tokens.
* @returns {Token[]} Array of objects representing tokens.
*/
api.getFirstTokens = function(node, count) {
var first = starts[node.range[0]];
Expand All @@ -150,7 +150,7 @@ module.exports = function(tokens) {
* Gets the last `count` tokens of the given node.
* @param {ASTNode} node The AST node.
* @param {int} [count=0] The number of tokens of the node to retrieve.
* @returns {[Token]} Array of objects representing tokens.
* @returns {Token[]} Array of objects representing tokens.
*/
api.getLastTokens = function(node, count) {
var last = lastTokenIndex(node) + 1;
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"patch": "node Makefile.js patch",
"minor": "node Makefile.js minor",
"major": "node Makefile.js major",
"docs": "node Makefile.js docs",
"gensite": "node Makefile.js gensite",
"browserify": "node Makefile.js browserify",
"perf": "node Makefile.js perf",
Expand Down Expand Up @@ -61,6 +62,7 @@
"dateformat": "^1.0.8",
"eslint-tester": "^0.5.0",
"istanbul": "^0.3.5",
"jsdoc": "^3.3.0-beta1",
"jsonlint": "^1.6.2",
"mocha": "^2.1.0",
"mocha-phantomjs": "^3.5.0",
Expand Down

0 comments on commit 6458979

Please sign in to comment.