{"action":"closed","issue":{"url":"https://api.github.com/repos/keithwhor/nodal/issues/220","repository_url":"https://api.github.com/repos/keithwhor/nodal","labels_url":"https://api.github.com/repos/keithwhor/nodal/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/keithwhor/nodal/issues/220/comments","events_url":"https://api.github.com/repos/keithwhor/nodal/issues/220/events","html_url":"https://github.com/keithwhor/nodal/issues/220","id":151984877,"number":220,"title":"Docs no long build","user":{"login":"nsipplswezey","id":7946707,"avatar_url":"https://avatars.githubusercontent.com/u/7946707?v=3","gravatar_id":"","url":"https://api.github.com/users/nsipplswezey","html_url":"https://github.com/nsipplswezey","followers_url":"https://api.github.com/users/nsipplswezey/followers","following_url":"https://api.github.com/users/nsipplswezey/following{/other_user}","gists_url":"https://api.github.com/users/nsipplswezey/gists{/gist_id}","starred_url":"https://api.github.com/users/nsipplswezey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsipplswezey/subscriptions","organizations_url":"https://api.github.com/users/nsipplswezey/orgs","repos_url":"https://api.github.com/users/nsipplswezey/repos","events_url":"https://api.github.com/users/nsipplswezey/events{/privacy}","received_events_url":"https://api.github.com/users/nsipplswezey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-29T22:58:47Z","updated_at":"2016-04-29T23:05:36Z","closed_at":"2016-04-29T23:05:35Z","body":"After a `npm install -g documentation` which is required to build the docs\r\n\r\n`npm run docs` runs the following command `\"docs\": \"documentation core/module.js -o docs -f html\" `\r\n\r\nThe command. Throws the following error:\r\n`Unknown command: core/module.js.  Did you mean \"documentation build core/module.js -o docs -f html\"?`\r\n\r\nLook's like the `documentation` package has been updated to use a `build` command.\r\n\r\nAdditionally running\r\n\r\n`documentation build core/module.js -o docs -f html`\r\n\r\nFails at parsing with the `babylon` which is the js parser that `documentation` now uses to parse javascript; unexpected token errors wherever an empty arrow function is passed:\r\n\r\n```\r\nnodal/core/required/controller.js: Unexpected token (19:38)\r\n  17 |       this._status = 200;\r\n  18 | \r\n> 19 |       this._responder = responder || () => {};\r\n     |                                       ^\r\n  20 | \r\n  21 |       this._securityPolicies = {};\r\n  22 | \r\n    at Parser.pp.raise (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:1378:13)\r\n    at Parser.pp.unexpected (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:2817:8)\r\n    at Parser.pp.parseParenAndDistinguishExpression (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:843:12)\r\n    at Parser.parseParenAndDistinguishExpression (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:3876:26)\r\n    at Parser.pp.parseExprAtom (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:708:19)\r\n    at Parser.parseExprAtom (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:4305:22)\r\n    at Parser.pp.parseExprSubscripts (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:504:19)\r\n    at Parser.pp.parseMaybeUnary (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:484:19)\r\n    at Parser.pp.parseExprOp (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:446:42)\r\n    at Parser.pp.parseExprOps (/usr/local/lib/node_modules/documentation/node_modules/babylon/index.js:419:17)\r\n```\r\n\r\nWent ahead verified that it's a `babylon` parsing error using their online parser\r\n[https://tonicdev.com/npm/babylon](https://tonicdev.com/npm/babylon) with an empty arrow function `() => {}`\r\nThrows the same error.\r\nWrapping the empty arrow function in parens solves the syntax error.\r\n\r\nLooks like the solution is to wrap empty anonymous arrow functions with parens\r\n\r\n```\r\n> 19 |       this._responder = responder || () => {};\r\n     |                                       ^\r\n```\r\n\r\nbecomes\r\n\r\n\r\n```\r\n> 19 |       this._responder = responder || (() => {});\r\n     |                                       ^\r\n```\r\n\r\nGave this a shot on my local repo and the docs built fine.\r\n\r\nI don't expect that this will break anything, but will test before making a PR.\r\n\r\n"}}