🐎 inline vm compatibility patch

This commit is contained in:
Kevin Sawicki
2015-02-17 16:50:03 -08:00
parent b290f0d200
commit 983027b27f
2 changed files with 8 additions and 4 deletions

View File

@@ -66,8 +66,7 @@
"temp": "0.8.1",
"text-buffer": "^4.1.5",
"theorist": "^1.0.2",
"underscore-plus": "^1.6.6",
"vm-compatibility-layer": "0.1.0"
"underscore-plus": "^1.6.6"
},
"packageDependencies": {
"atom-dark-syntax": "0.26.0",

View File

@@ -44,8 +44,7 @@ window.onload = function() {
extra: {_version: loadSettings.appVersion}
});
require('vm-compatibility-layer');
setupVmCompatibility();
setupCsonCache(cacheDir);
setupSourceMapCache(cacheDir);
setup6to5(cacheDir);
@@ -104,3 +103,9 @@ var setupCsonCache = function(cacheDir) {
var setupSourceMapCache = function(cacheDir) {
require('coffeestack').setCacheDirectory(path.join(cacheDir, 'coffee', 'source-maps'));
}
var setupVmCompatibility = function() {
var vm = require('vm');
if (!vm.Script.createContext)
vm.Script.createContext = vm.createContext;
}