If you have arrived so far in this long article I must give you my most sincere congratulations. Also thank you for following me that far. I feel good if at least I’ve been able to help one future-me and saved the long path I had to follow all along. I would be glad if this is you and you can leave some comments and know if this guide has been helpful for you.
Now you can follow these steps for every file and dependencies that you want to refactor to a module. And you can decide how much to refactor with this approach.
Most of the time is taken setting up what I explained, but you will see refactoring new files to modules will be a piece of cake after the first one.
I recommend you checking at least 2 chapters of the “Extras” section; as they were completely necessary for me but they might not be for you. So I decided to leave them apart:
Generate JQuery module