Although not mentioned in the readme or docs, ampersand help tells me that I should be able to generate a router:
$ ampersand --help
ampersand starts a generator for building an app.
ampersand gen view ${name} generates a view in appropriate folder in current folder (per config)
ampersand gen model ${name} generates a model in appropriate folder in current folder (per config)
ampersand gen router ${optional name} generates a router in client app folder in current folder (per config)
ampersand gen page ${name} generates a page view in appropriate folder in current folder (per config)
So I try the command:
$ ampersand gen router
no such command
Ok, so what if I provide the "optional" parameter? Error below, plus a blank myrouter.js file is generated.
$ ampersand gen router myrouter
/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:3718
throw e;
^
Error: Line 13: Unexpected token }
at throwError (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:1831:21)
at throwUnexpected (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:1889:9)
at expect (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:1898:13)
at parseArguments (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:2217:17)
at parseLeftHandSideExpressionAllowCall (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:2283:24)
at parsePostfixExpression (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:2325:16)
at parseUnaryExpression (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:2352:20)
at parseBinaryExpression (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:2473:16)
at parseConditionalExpression (/usr/local/lib/node_modules/ampersand/node_modules/esprima/esprima.js:2533:16)
at parseAssign
Although not mentioned in the readme or docs,
ampersand
help tells me that I should be able to generate a router:So I try the command:
Ok, so what if I provide the "optional" parameter? Error below, plus a blank
myrouter.js
file is generated.