I'm trying to build the skeleton of what one day might be the foundation of my next project. I started with generator-cg-angular (https://github.com/cgross/generator-cg-angular) as it includes most of the libraries that I want to use on the client + it follows angular best practices for building the directory structure.
I made several changes to project already. I moved node_modules in the global namespace. I wrote a little nodejs server and I configured node and angular routing.
Now I installed requirejs with npm in my node_modules and changed my server classes to load with it. Now I want to move on the client. The thing is that I'm not sure how to configure requirejs in this situation. The obvious approach is to include it in bower configuration and use it in the client. But I have a few questions.
- Is the obvious approach the right approach
- Can I have a common modules that I can use on the client and on the server. An example can be an utility module.