Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ampersand gen router #65

Open
fyockm opened this issue Oct 31, 2014 · 1 comment
Open

ampersand gen router #65

fyockm opened this issue Oct 31, 2014 · 1 comment

Comments

@fyockm
Copy link
Member

fyockm commented Oct 31, 2014

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
@fyockm
Copy link
Member Author

fyockm commented Nov 10, 2014

Perhaps removing the help and code that handles router gen is the easiest solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants