jeudi 30 août 2018

Ember-cli addon dev, how to differentiate addon dev from application dev

When you create an ember-cli addon, you are supposed to be able to run a dummy app.

If a component need to access it's vendor folder you access "public/" in production. While developping the ember app that use the addon you access :

app.options.project.nodeModulesPath + "/"+ this.name+"/vendor/"

However, when you run the ember-cli addon server (the dummy app) you need only "vendor/".

this.getEnv() will return developpement while developping an addon, or an app using the addon.

How can I, in index.js, differentiate app dev from addon dev ?




Aucun commentaire:

Enregistrer un commentaire