Skip to content

Commit fa8ef3c

Browse files
committed
convert to module
1 parent 078f9e3 commit fa8ef3c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
run:
2+
echo "Starting at http://localhost:8000"
3+
python -m SimpleHTTPServer # Python2.7
4+
# python -m http.server 8000 # Python 3

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
22
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
3-
<script src="src/rascript.js"></script>
4-
<script>
5-
hljs.registerLanguage('rascript', RAScript);
3+
<script type="module">
4+
import rascript from "./src/rascript.js";
5+
hljs.registerLanguage("rascript", rascript);
66
hljs.initHighlightingOnLoad();
77
</script>
88
<pre>

src/rascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Contributors:
44
* Joshua Raphael
55
*/
6-
function RAScript(hljs) {
6+
export default function(hljs) {
77
return {
88
case_insensitive: false,
99
contains: [

0 commit comments

Comments
 (0)