-
Notifications
You must be signed in to change notification settings - Fork 178
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
Project fails to startup when naming a crud module as a plural noun that doesn't end in 's'. #234
Comments
I'd like to submit a patch for this bug that will correct the problem. |
@donohutcheon Can you submit a PR for it? |
No problem. I'm new to GitHub but keen to help. What's the protocol? Do I need permissions to create a new branch? |
You fork the repo, create a branch on your repo, make your changes and commit, then create a PR from your branch on your fork to the master branch of this repo as the base. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The bug is reproducible by following the following Youtube video MeanJS - MEAN stack Yeoman Generator Tutorial from 3:47 up to 5:54.
The problem occurs because the
crud-module/templates/tests/server/_.server.routes.tests.js
file refers to a variable named<%= camelizedPluralName %>GetRes
on line 89 but in the function definition on line 82 the argument is named :camelizedSingularName %>sGetErr
. For most English nouns this problem will go undetected, however in the case of Superheroes (and other plural nouns that don't end in 's') the test defines a function argument of SuperherosGetRes (line 82) but on line 89 refers to the correct plural variable name: SuperheroesGetRes.The result is that the test fails and
gulp
does not initialise the application when executed usinggulp
:Obviously there are other scenarios where the inflections module will fail to match the module name to the appropriate noun / plural noun, for example
formulae
becomesformulaes
. For this specific scenario the actual template code is inconsistent and should be fixed.The text was updated successfully, but these errors were encountered: