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 publish = (id, name) => {
|
||||
const add = (id, as) => {
|
||||
if (!global[id]) {
|
||||
throw new Error(`no-global: ${id}`);
|
||||
}
|
||||
globals[name] = global[id];
|
||||
globals[as] = global[id];
|
||||
};
|
||||
|
||||
publish('window', 'win');
|
||||
publish('kjua', 'kjua');
|
||||
publish('marked', 'marked');
|
||||
publish('Prism', 'prism');
|
||||
add('window', 'win');
|
||||
add('kjua', 'kjua');
|
||||
add('marked', 'marked');
|
||||
add('Prism', 'prism');
|
||||
|
|
|
@ -27,4 +27,6 @@
|
|||
/* eslint-enable */
|
||||
|
||||
|
||||
// @include "vendor/*.js"
|
||||
// @include "vendor/kjua*.js"
|
||||
// @include "vendor/marked*.js"
|
||||
// @include "vendor/prism*.js"
|
||||
|
|
Loading…
Add table
Reference in a new issue