-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs: Using only a subset of languages with Node/npm #1257
Comments
Sure. You can pass |
@isagalaev but that will not exclude the files from the packed JavaScript file or am I missing something? in index.js we have a ton of calls to
As far as I understand we can just avoid |
Here's my complete example which is working for me var hljs = require("highlight.js/lib/highlight.js");
hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'));
hljs.registerLanguage('sql', require('highlight.js/lib/languages/sql')); |
Thanks, @Remo. This was incredibly helpful. Would love to see it documented on the website or README. |
This is in the README now. |
If you install the package from
npm
, the built file has all languages.How is it possible to use only some languages?
The text was updated successfully, but these errors were encountered: