mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 03:57:08 -04:00
Minor.
This commit is contained in:
parent
24945faded
commit
6dbffb8be1
2 changed files with 9 additions and 7 deletions
|
@ -1,13 +1,13 @@
|
||||||
const globals = module.exports = {};
|
const globals = module.exports = {};
|
||||||
|
|
||||||
const publish = (id, name) => {
|
const add = (id, as) => {
|
||||||
if (!global[id]) {
|
if (!global[id]) {
|
||||||
throw new Error(`no-global: ${id}`);
|
throw new Error(`no-global: ${id}`);
|
||||||
}
|
}
|
||||||
globals[name] = global[id];
|
globals[as] = global[id];
|
||||||
};
|
};
|
||||||
|
|
||||||
publish('window', 'win');
|
add('window', 'win');
|
||||||
publish('kjua', 'kjua');
|
add('kjua', 'kjua');
|
||||||
publish('marked', 'marked');
|
add('marked', 'marked');
|
||||||
publish('Prism', 'prism');
|
add('Prism', 'prism');
|
||||||
|
|
|
@ -27,4 +27,6 @@
|
||||||
/* eslint-enable */
|
/* eslint-enable */
|
||||||
|
|
||||||
|
|
||||||
// @include "vendor/*.js"
|
// @include "vendor/kjua*.js"
|
||||||
|
// @include "vendor/marked*.js"
|
||||||
|
// @include "vendor/prism*.js"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue