Checking dependencies in an AMD style module – How To ?

Hello guys and girls :)

Some of you might have converted their old Javascript Modules to AMD style?
Then you probably encountered this creepy feeling when you wonder if you have set all the necessary dependencies right, if you have not forgotten any or worse… if you haven’t forgotten to remove any… (which would mean loading useless dependencies!)

Let me release you from part this suffering, here is a little tool that will do a certain number of checks for you.
This tool does not claim 100% success, nor does it solve anything, it is merely a pointer to probably missing dependencies, or unused ones.
It does not modify your files, just read them.

The good thing with this tool is that it is not trying to do more than what it has been done for : reading files and reporting suspicions. But it does it fast, and spare you with the pain of reading your files a thousand times :)

You will find the little tool here : Amd-Dependency-Checker
It is coded in PHP so you are expected to have a php interpreter somewhere :)
Feel free to pull req to make it better or propose a port to any other language!


Share and Enjoy

This entry was posted in Dojo, PHP and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *