mulesoft-labs / raml-client-generator

Template-driven generator of clients for APIs described by a RAML spec
Other
121 stars 27 forks source link

Question about generated javascript. #4

Closed AWaselnuk closed 9 years ago

AWaselnuk commented 9 years ago

Hey Blake,

I have a general javascript question. The generated client library includes a line like:

require('b' + 'luebird')

I am curious why you would break up the string like that? I am fairly new to the Node ecosystem and AMD patterns.

blakeembrey commented 9 years ago

@AWaselnuk That was kind of hacky and has been fixed in the latest version (to be released soon), but it was to stop Browserify from initially adding it to the browserified build. Of course, there is just the browsers field in the package.json for this, but that was legacy from before that. It's an awful practice and other newer commonJS compilers I believe still require it like that, so don't do it :smile:

AWaselnuk commented 9 years ago

Ha ha. Alright thanks Blake!