Copy the generated snapshot into the app bundle

This commit is contained in:
Antonio Scandurra
2017-02-24 10:39:05 +01:00
parent c2f02e16fe
commit 5dbae1c317
4 changed files with 30 additions and 13 deletions

View File

@@ -1,5 +0,0 @@
require('./update-process-env')
require('./window')
require('./atom-environment')
require('./application-delegate')
require('./clipboard')

View File

@@ -1,5 +1,5 @@
if (typeof snapshotResult !== 'undefined') {
snapshotResult.setGlobals(global, process, {}, require)
snapshotResult.setGlobals(global, process, global, {}, require)
}
const startTime = Date.now()

View File

@@ -70,7 +70,7 @@ class Task
compileCachePath = require('./compile-cache').getCacheDirectory()
taskBootstrapRequire = "require('#{require.resolve('./task-bootstrap')}');"
bootstrap = """
snapshotResult.setGlobals(global, process, global, require)
snapshotResult.setGlobals(global, process, global, {}, require)
CompileCache = snapshotResult.customRequire('../src/compile-cache.js')
CompileCache.setCacheDirectory('#{compileCachePath}');
#{taskBootstrapRequire}