I have a javascript project consisting of two js-files
- component.js
- component.angular.js
component.js contains the actual logic exported to globals, amd or whatever. It can be used as-is if you are not using angular. component.angular.js wraps the the logic in an angular directive, but requires the logic from component.js.
I would like to register/publish both a non-angular (only need component.js) and a angular (need both component.js and component.angular.js) version of this component in Bower.
Overall question: How to do that?
Questions that might help you figure out why I am confused:
- Can you even state that two js-files needs to be used in a bower.json?
- I guess registering the repository where the code lives in Bower, it will look for a bower.json file. But I guess I cannot state in a bower.json that you will need both files in case of angular and only one of them in case of non-angular.
- Can I have two different bower.json files in the same repository? And register them under two different names in Bower - e.g. under "mycomponent" and "mycomponent-angular".
- Do I need two repositories?