elouazzany / generator-gulp-angular-sub

gulp-angular subgenerator
MIT License
14 stars 3 forks source link

kebab-case name should convert to CamelCase #1

Open bradwbradw opened 8 years ago

bradwbradw commented 8 years ago

if I specify a name of a new component with kebab-case, the generated code looks like

(function() {
  'use strict';

  angular
    .module('appName')
    .factory('foo-bar', foo-bar);

  /** @ngInject */
  function foo-bar() {
    return function () {

    };
  }
})();

It should convert name into camelCase, eg:

(function() {
  'use strict';

  angular
    .module('appName')
    .factory('FooBar', FooBar);

  /** @ngInject */
  function FooBar() {
    return function () {

    };
  }
})();

It should keep the filenames kebab-case, though (foo-bar.service.js)

As per https://github.com/mgechev/angular2-style-guide#directory-structure

elouazzany commented 8 years ago

thanks for your remarks, I will fix this as soon as possible or if you have the fix, your contributions are welcome

bradwbradw commented 8 years ago

no problem. I didn't make a fix, but I saw in the original generator gitHub you asked for feedback on this, so here is my feedback :+1: