Skip to content

Commit b9690d7

Browse files
silverwindzeripath
authored andcommitted
move highlight.js to npm/webpack (#10011)
- introduced window.config to help with js-based lazy-loading - adjusted webpack chunk naming to avoid 'vendors~name.js' that webpack defaults to for vendor chunks. - added theme class to html and prefixed all selectors. this is neccesary so that the theme styles win over the lazy-loaded ones. Co-authored-by: zeripath <[email protected]>
1 parent d879353 commit b9690d7

File tree

16 files changed

+53
-254
lines changed

16 files changed

+53
-254
lines changed

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ globals:
1919
CodeMirror: false
2020
Dropzone: false
2121
emojify: false
22-
hljs: false
2322
SimpleMDE: false
2423
u2fApi: false
2524
Vue: false

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
},
77
"dependencies": {
88
"fomantic-ui": "2.8.3",
9+
"highlight.js": "9.18.0",
910
"jquery": "3.4.1",
1011
"jquery-migrate": "3.1.0",
1112
"swagger-ui": "3.24.3",

public/vendor/VERSIONS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Version: 1.1.0
2626
File(s): /vendor/plugins/dropzone/dropzone.js
2727
Version: 4.2.0
2828

29-
File(s): /vendor/plugins/highlight/highlight.pack.js
30-
Version: 2b46620c9d62e9becf5f25969b5ccc41fa1da470
29+
File(s): /js/highlight.js
30+
Version: 9.18.0
3131

3232
File(s): /vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js
3333
Version: 2.4.5

public/vendor/librejs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666
<td><a href="https://github.com/enyo/dropzone/archive/v4.2.0.tar.gz">dropzone.js-4.2.0.tar.gz</a></td>
6767
</tr>
6868
<tr>
69-
<td><a href="./plugins/highlight/highlight.pack.js">highlight.pack.js</a></td>
69+
<td><a href="./highlight.js">highlight.js</a></td>
7070
<td><a href="https://github.com/highlightjs/highlight.js/blob/master/LICENSE">BSD 3-Clause</a></td>
71-
<td><a href="https://github.com/highlightjs/highlight.js/archive/2b46620c.tar.gz">highlight.js-2b46620c.tar.gz</a></td>
71+
<td><a href="https://github.com/highlightjs/highlight.js/archive/9.18.0.tar.gz">highlight.js.tar.gz</a></td>
7272
</tr>
7373
<tr>
7474
<td><a href="./plugins/jquery.datetimepicker/jquery.datetimepicker.js">jquery.datetimepicker.js</a></td>

public/vendor/plugins/highlight/LICENSE

Lines changed: 0 additions & 25 deletions
This file was deleted.

public/vendor/plugins/highlight/default.css

Lines changed: 0 additions & 99 deletions
This file was deleted.

public/vendor/plugins/highlight/github.css

Lines changed: 0 additions & 99 deletions
This file was deleted.

public/vendor/plugins/highlight/highlight.pack.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

templates/base/footer.tmpl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
{{end}}
2525

2626
<!-- Third-party libraries -->
27-
{{if .RequireHighlightJS}}
28-
<script src="{{StaticUrlPrefix}}/vendor/plugins/highlight/highlight.pack.js"></script>
29-
{{end}}
3027
{{if .RequireMinicolors}}
3128
<script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js"></script>
3229
{{end}}

0 commit comments

Comments
 (0)