ember.jsember-cliember-addon

Is there an easier way to debug ember addons


I have been just starting out with ember addon and one of the difficulty I am facing is to debug it. I have a separate repo for my addon(lets name it my-addon for now), and everytime I make any change, I have to

1) commit it

2) push the changes

3) go to consuming app and then re install the app from git(atleast re-run npm install git:address so I get the latest changes)

4) run ember g my-addon (because I am in older cli)

5) do build

6) and check if things are working

This process is kinda tedious, I was wondering if I can place the addon(all of it) within the consuming app itself, atleast in the dev phase so I can just build my ember app and test the addon in the consuming app itself, and once I feel good about, push it to my local git repo.

Any thoughts or approach on how you folks do it - or may be I am just missing out something and doing it wrong!

Thanks, Dee


Solution

  • If you use ember-cli you can link your local addon in the consuming app. You can find all details in the user guide

    Note that watchman doesn't observe local addon symlinked (there are couple of issues opened both on ember-cli and watchman). I've resolved removing watchman falling back to NodeWatcher (I'm on mac)