mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Only expose VirtualMachine to window for bundles
This commit is contained in:
parent
499ba5235c
commit
fa10a2279a
5 changed files with 788 additions and 410 deletions
|
@ -20,6 +20,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"eslint": "2.7.0",
|
||||
"expose-loader": "0.7.1",
|
||||
"highlightjs": "8.7.0",
|
||||
"json-loader": "0.5.4",
|
||||
"scratch-blocks": "git+https://git@github.com/LLK/scratch-blocks.git#develop",
|
||||
|
|
|
@ -228,8 +228,5 @@ VirtualMachine.prototype.emitWorkspaceUpdate = function () {
|
|||
'xml': this.editingTarget.blocks.toXML()
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Export and bind to `window`
|
||||
*/
|
||||
|
||||
module.exports = VirtualMachine;
|
||||
if (typeof window !== 'undefined') window.VirtualMachine = module.exports;
|
||||
|
|
12
vm.min.js
vendored
12
vm.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -14,6 +14,9 @@ module.exports = {
|
|||
{
|
||||
test: /\.json$/,
|
||||
loader: 'json-loader'
|
||||
}, {
|
||||
test: require.resolve('./src/index.js'),
|
||||
loader: 'expose?VirtualMachine'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue