I am creating my first Bower component. After running bower init
the script asks me 'what types of modules does this package expose?' with these options:
what is the difference between these options?
If you don't know, it's quite likely globals is the right answer for you.
Either way, you need to understand:
This feature was introduced very recently in bower and is not documented at all yet (AFAIK). It essentially describes the moduleType
, which states for what module technology the package is meant to be consumed (see above).
Right now, It doesn't have any effect apart from setting the moduleType
property in the bower.json
file of the package.
See https://github.com/bower/bower/pull/934 for the original pull-request.
A few additional points, to answer comments:
moduleType
property - which means that people are technically allowed to use whatever value they want for it, including angularjs
if they feel inclined to do sonon-interoperable/proprietary moduleTypes
(think composer, angular, etc) - which is easily understandable, but yet again, nothing really prevents people from using the moduleType
value they wantyui moduleType
, so, there are "exceptions" to be made, assuming they are part of a concerted planWhat I would do if I were to author a package for a not-listed package manager and publish it on bower?
I would author an es6 module, and use / patch es6-transpiler to output the package format I need. Then I would either/and:
es6
as a moduleType
Disclaimer: I don't have real-life experience authoring angularjs modules.