Documentation for AMD Support?

25 views
Skip to first unread message

Michael Cantera

unread,
Oct 20, 2012, 4:28:11 PM10/20/12
to highl...@googlegroups.com
The changelog for version 7.1 mentions "Thanks to Casey Duncan the library can now be built in the popular AMD format." Is there any documentation, blog posts, etc., that show how to do this?

Ivan Sagalaev

unread,
Oct 20, 2012, 5:14:51 PM10/20/12
to highl...@googlegroups.com
Yes, there are docs on building[1]. It doesn't explicitly mentions AMD
though, just refers to the `--help` option of the build script where it
is listed. Anyway, building highlight.js for AMD is as simple as:

python tools/build.py -t amd

It builds a compressed "build/highlight.pack.js" with all the languages
and is theoretically ready to be used. I say "theoretically" because I'm
personally not aware if anyone already uses it successfully in practice,
so if you confirm that it works it'd be appreciated.

[1]: http://highlightjs.readthedocs.org/en/latest/building-testing.html

Michael Cantera

unread,
Oct 20, 2012, 6:39:10 PM10/20/12
to highl...@googlegroups.com
Thanks for the quick reply. I expect to go with the precompiled approach as discussed in my other question, but if I do integrate via RequireJS at some point, I'll report back here.

Ivan Sagalaev

unread,
Oct 20, 2012, 9:01:14 PM10/20/12
to highl...@googlegroups.com
Thanks! Keep us posted!
Reply all
Reply to author
Forward
0 new messages