-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Change behaviour of standardLocals in blueprints for slashes #1278
Conversation
Looks good to me. The test coverage for generators/blueprints is certainly thorough 😄 |
assertFile('tests/unit/models/foo/bar-test.js', { | ||
contains: [ | ||
"import { test, moduleForModel } from 'ember-qunit';", | ||
"moduleForModel('foo/bar', 'FooBar'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use the dasherization full name here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is testing for what the actual output is - are you suggesting changing the output from the command or the test? (I'm assuming you're talking about the description here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Are we waiting for something on this, or just not gotten around to it yet? I realize not all the tests necessarily reflect the desired outcome from generate commands for directories, they only show what this change does. Would it be better if I removed the tests that don't reflect what we want in the end? We should do more work on directories in generators, but changing these variables is a pretty good first step. |
havent had a chance to review. |
Can you add a changelog entry, squash, and rebase? |
Conflicts: CHANGELOG.md
Done |
Change behaviour of standardLocals in blueprints for slashes
This PR strips the slash from some of the standard locals in blueprints.
An example of before and after with the command
ember generate view foo-bar/baz-qux
:dasherizedModuleName
foo-bar/baz-qux
foo-bar/baz-qux
classifiedModuleName
FooBar/bazQux
FooBarBazQux
camelizedModuleName
fooBar/bazQux
fooBarBazQuix
dasherizedModuleName
is left alone, as that is used for the generation of the files themselves.See the new tests for details on how this affects all the different included generators. (It is most obvious in the generated tests).
classifiedPackageName
should probably also be changed, but I don't know any usecases for it right now.