We have 5+ ember.js
projects. I've extracted all common features as an addon. Other projects depend my addon with package.json
(as npm module).
I want to do some post-processing after my addon upgraded on any project (via npm install
). I need to do such processing:
/app/styles.css
file.router.js
/translations
directory.Is there any hook to do these? Is there any documentation for hooks?
What we did:
/app/styles.css
file: We are not using app/styles files. We created a bower addon to keep our styles. In our ember addon's index.js
file, there is a hook called included(app)
. We use app.import
calls to place our styles to the apps.router.js
: We are not overriding router.js
. Modification needs occur very rarely. So we announce it on our releases if any modification is needed./translations
directory: After upgrading ember-intl#2.8
. We will not need to modify /translations
directory.