Currently, I am in the process of refactoring an application and I have come across John Papa's guidelines which I find very intriguing and helpful: John Papa Guidelines - Application Structure
After reading the guidelines, I have decided to split my application into different modules based on features. For example, having one module for accounts, another for transfers, and a third for user settings.
I plan to follow John Papa's recommendations by creating one app module and separate feature modules like account-module.js, transfer-module.js, and user-settings-module.js with their respective navigation configurations (states-config.js, etc.).
However, I am now facing a bit of a challenge as I want to build multiple applications depending on specific requirements. For instance, I might need to exclude the transfer module from one version of the application during the grunt process through configuration.
The current tools I am using, such as include_source and grunt_war, do not provide a way to package specific modules easily within an "angular module" context. This poses some limitations when it comes to customizing application builds.
Large applications may have faced similar challenges when delivering customized solutions to different clients without including all modules universally. How do they tackle this issue? Is it manual, or do they use custom grunt (gulp) tasks/scripts?
Bonus question: In an ideal world where a grunt task exists for this purpose, how would I manage configurations within my application? For example, if I need to remove the transfer button from the menu based on the selected modules. Integrating a grunt task that reads from the same configuration file as the app could potentially streamline this process. Perhaps utilizing 'grunt-angular-settings' task to maintain constants within the app.
Thank you for your insights and feedback! I'm eager to hear your thoughts :)
Best regards, Yassine GAYL