ember-codemods / ember-module-migrator

Automated migration for new Ember application layout.
74 stars 15 forks source link

Migrate to using core-object. #1

Closed rwjblue closed 8 years ago

rwjblue commented 8 years ago

Instead of:

function MixinFileInfo(options) {
  options.type = 'util';

  ClassicFileInfo.apply(this, arguments);
}
MixinFileInfo.prototype = Object.create(ClassicFileInfo.prototype);
MixinFileInfo.prototype.constructor = MixinFileInfo;

MixinFileInfo.prototype.populateDestination = function() {
};

We should be able to do this:

var MixinFileInfo = FileInfo.extend({
  init: function(options) {
    options.type = 'util';
    this._super(options);
  },

  populateDestination: function() { }
});
trabus commented 8 years ago

Starting work on this now. Should hopefully have a PR by the end of the night!