Skip to content

Commit

Permalink
Patch: Include example of simple Node.js usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
robloxiandemo committed Nov 10, 2023
1 parent 7639d4b commit d7e7e12
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ Simply load this module after loading Highlight.js. You'll use the minified vers
</script>
```

### Using directly from the UNPKG CDN

```html
<script type="text/javascript"
src="https://unpkg.com/highlightjs-luau/dist/luau.min.js"></script>
```

- More info: <https://unpkg.com>

### With Node or another build system

If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.

```javascript
var hljs = require('highlightjs');
var hljsLuau = require('highlightjs-luau');

hljs.registerLanguage("luau", hljsLuau);
hljs.highlightAll();
```

## License

Highlight.js is released under the BSD 3-Clause License. See [LICENSE](https://github.com/highlightjs/highlight.js/blob/main/LICENSE) file for details.
Expand Down

0 comments on commit d7e7e12

Please sign in to comment.