bower-requirejs icon indicating copy to clipboard operation
bower-requirejs copied to clipboard

Override path key

Open robjens opened this issue 8 years ago • 1 comments

Hi, does there happen to be a setting(s) (beyond merely the main file) for overriding the used path key? E.g. bower uses deonasdan-bootstrap-datetimepicker as a key name for the path where I'd really just like it be the much more terse datetimepicker.

I couldn't find this in the documentation... I guess that goes for all settings that are on the cli tool versus defined inline (shown) but missing the link to bower.json configuration. Really only thing shown is the override and wondering if and if so how (which keys) the other settings are supported. Excluding e.g. requirejs itself (as it needs to be loaded before require.config) would be once of these things I'd fancy.

Anyway, on the other hand, I should really just inspect the source code :P

Thanks.

robjens avatar Feb 25 '16 17:02 robjens

I guess not: https://github.com/yeoman/bower-requirejs/blob/master/lib/build-config.js#L16

name is added at the key and I don't see any logic where this can be altered elsewhere either. Could be it is not done for other reasons to me - as relatively new to requirejs - haven't understood or encountered yet, but I do think the module path key names can be arbitrarily chosen. The problem might be, to later check and not add the same require.config entries again, but since we're reading bower.json anyway, might as well pick up on the custom names as well. Anyway, also looking into webpack somewhat as I find the whole deal of managing many files/modules/dependencies annoyingly manual grunt labor I don't want to be putting up with too much. This helps a great deal already, since the amount of variaties people use in mostly folder structure, was one of the biggest pains in my ass, so kudo's for making this tool anyway. Anyway assuming this might be an idea/suggestion for feature, I'll leave the ticket open now to get some/a response, could do something like a PR if wanted.

robjens avatar Feb 26 '16 08:02 robjens