-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Standardize filenames #463
Comments
I prefer lower case names. |
It's so ugly... Why just don't let filenames be as they were submitted in CLI? If I want name all my files somethinglikethatandletthembeugly, I just will submit it in CLI... |
you could always rename them yourself and update the references. Having them be mixed case caused more problems. lower cased file names are better for web stuffs anyway since most servers are lower case/case insensitive and requiring people to remember mixed case urls is mean |
Of course I can, but automation tools should not require manual fixes... In other words, it's really frustrating change and I'm going to fork and freeze 0.6 version for future usage. |
Why enforce lower case? if I, as a developer, want to use lower case, I'd just declare them lower case. I'm in total agreement with @Jamm |
I think I agree with not touching the case. Could break existing workflows and if people that prefer lower case can still just pass it like that to the generator. |
+1 to leaveMyCasingAlone. For #462, and And if not, writing one would be at least predictable - we can expect a filename to have dots or dashes. (Not an expert in legal file names, but I don't think we should cater to edge cases) Yet another option would be displaying a prompt with a few suggestions, and letting the user decide. Just some ideas. I think maintaining some casing, as it originally was, is less jarring/upsetting than turning |
Reopening this and will add behavior so the file name follows the angular:xyz name. Lets see how many bugs that generates 🎱 |
@eddiemonge filenames shouldn't follows any hardcoded rules, developer should be able to declare name of file (and controller, directive, service) exactly as he wants. If user will create name pfxRemoteIP and your "behavior" will change it to PfxRemoteIp - it will be mistake (2 mistakes). |
The issue is that this is a scaffold generator. When you say |
|
+1 for keeping the original |
👍 |
+1 for leaving the decision to the developer. The lowercase commit introduced a bug too.. scripts declaration in my index.html were not lowercased. Just took me 30 mins to find why they weren't loading. |
I experienced this same problem, script references in index.html are still camel case, not good |
+1 for leaving the decision to the developer 😄 |
The bug for this in the current implementation is at #526 |
generator-angular currently handles filenames strangely. See: yeoman/generator-angular#463
This is of huge annoyance. Just piling on FWIW - it makes it difficult to add yeoman to a team when you have to mention intricacies like this; "Yeah it will do all this stuff for you but you have to edit it". It's an insipid bug too, since it typically will only surface when you publish to prod (linux) and go from a CI system (OSX) to a case-sensitive one. +1 to revert ASAP, not wait for the "configuration system" to be in place. This BUG was ADDED and is not a feature. All that's needed is to revert this: https://github.com/yeoman/generator-angular/pull/504/files |
I can't believe it's been months and they haven't reverted those changes back. It clearly is the source of many bugs. |
The source of the many bugs was the bug that the filename didn't get the same treatment. Thats been fixed in the latest release. Long term, choosing what casing you want to use will be a configuration option. |
yo angular:service h5mAnimation -->
Bug returned after todays update to yeoman 1.2 |
How about optionally providing the filename? When I have similar name service vs. controllers vs. directives vs. views, I like to have the type in the filename so I can quickly type it in and bring it up in my text editor rather than having to look at which subfolder a list of matching filenames are in...
|
Any news about this? I am eager to upgrade but reluctant due to this issue for over half a year now.. |
this really isnt an upgrade blocking issue. nothing new yet. still slowly working on adding these things in |
I'd like to see a way to specify a file naming pattern. We usually name things with "service" = .srv and "controller" = .ctrl, like this: Or at least consistent, like: |
My collection of file naming approaches is in the "Naming conventions" section of this spreadsheet , currently starting on row 195. If you would like to contribute just send me a request to share the doc. |
I beg to differ - I have a project that used this generator when it supported camel case. I have to say I really don't understand this issue. My IDE for example supports camel case search for file name. perhaps the only files you should enforce lower case are the html files.. that I would get.. I would love to help speed up the process. what do I need to do in order to help? I am visiting this page once a week at least just to check if something changed. I am very eager to see a change in the status. BTW - I am pretty sure it created a bug. if I do yo angular:controller GuyTest it becomes GuytestCtrl. was this intentional? I have never seen a convention like this in any language. This bug exists since 0.6.0 - I am forced to downgrade even more. |
Changes: - Update jshint task in `Gruntfile.js` to include `serverTest` - Add `server/.jshintrc-spec` that extends `server/.jshintrc` with spec globals - Use `"latedef": "nofunc"` instead of `"latedef": true` in `server/.jshintrc` - Add assertion for `jshint` task in generator tests for `defaultOptions` - Fix pre exsisting lint errors in `server` and `client` - Change `getEmail()` in `client/app/account/settings/settings.controller` to use `user` arg and not `$scope.user` Closes yeoman#463, yeoman#486
With the latest version, I'm still seeing this with the controller generator. Would very much like a way to specify the case pattern used. |
Hi, if anyone is still looking for a camel-case version, I have one on my fork. |
As I see this the only problem here is the misleading documentation of generator-angular. It obviously shows an old example where myDirective resulted in myDirective.js But the actual behavior of the subgenerators makes sense, i.e. the directive name is supposed to be entered in lowercase with hypens as delimiters (e.g. as we do within templates to declare an directive). |
Should all filenames be all lower cased? This is one of the last remaining naming issues I think. Lower casing all file names would solve a few problems.
The text was updated successfully, but these errors were encountered: