jeudi 19 juillet 2018

What's the conventional directory for classes in an Ember project?

If I create a custom class according to https://guides.emberjs.com/release/object-model/classes-and-instances/,

e.g.

// person.js
import EmberObject from '@ember/object';

const Person = EmberObject.extend({
  say(thing) {
    alert(thing);
  }
});

Is there a conventional directory in the ember project for person.js?

None of these conventional directories seem quite right...

  • adapters/ (specific purpose)
  • components/ (specific purpose)
  • controllers/ (specific purpose)
  • helpers/ (specific purpose)
  • models/ (for actual DS Models)
  • routes/ (specific purpose)
  • styles/ (not js)
  • templates/ (not js)
  • serializers/ (specific purpose)
  • utils/ (too generic)



Aucun commentaire:

Enregistrer un commentaire