deblondon / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

RequireJS compatibility #199

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be wonderful if prettify.js was RequireJS friendly. That is, if it 
checked for the existence of a define() function and registered itself as a 
module. As an added bonus, it would even more awesome if all the global state 
were reduced to a single variable named prettify.

See jQuery source for an example: 
https://github.com/jquery/jquery/blob/master/src/exports.js

Original issue reported on code.google.com by chris.calo on 30 Mar 2012 at 3:44

GoogleCodeExporter commented 8 years ago
Patch attached which uses define if it's available. It exports the value 
window['PR'], to which I've added the two functions prettyPrintOne and 
prettyPrint.

Original comment by michael....@red-gate.com on 2 Apr 2012 at 10:44

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r221.

Original comment by mikesamuel@gmail.com on 8 Apr 2012 at 8:29

GoogleCodeExporter commented 8 years ago
Wonderful. Thanks for the quick fix!

Original comment by chris.calo on 9 Apr 2012 at 2:25