Add original-fs module
This commit is contained in:
parent
db8361a0a9
commit
5cb97545fd
3 changed files with 10 additions and 0 deletions
1
atom.gyp
1
atom.gyp
|
@ -38,6 +38,7 @@
|
||||||
'atom/common/api/lib/clipboard.coffee',
|
'atom/common/api/lib/clipboard.coffee',
|
||||||
'atom/common/api/lib/crash-reporter.coffee',
|
'atom/common/api/lib/crash-reporter.coffee',
|
||||||
'atom/common/api/lib/id-weak-map.coffee',
|
'atom/common/api/lib/id-weak-map.coffee',
|
||||||
|
'atom/common/api/lib/original-fs.coffee',
|
||||||
'atom/common/api/lib/screen.coffee',
|
'atom/common/api/lib/screen.coffee',
|
||||||
'atom/common/api/lib/shell.coffee',
|
'atom/common/api/lib/shell.coffee',
|
||||||
'atom/common/lib/init.coffee',
|
'atom/common/lib/init.coffee',
|
||||||
|
|
6
atom/common/api/lib/original-fs.coffee
Normal file
6
atom/common/api/lib/original-fs.coffee
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
fs = require 'fs'
|
||||||
|
|
||||||
|
copied = {}
|
||||||
|
copied[k] = v for k, v of fs
|
||||||
|
|
||||||
|
module.exports = copied
|
|
@ -35,5 +35,8 @@ if process.type is 'browser'
|
||||||
global.setTimeout = wrapWithActivateUvLoop timers.setTimeout
|
global.setTimeout = wrapWithActivateUvLoop timers.setTimeout
|
||||||
global.setInterval = wrapWithActivateUvLoop timers.setInterval
|
global.setInterval = wrapWithActivateUvLoop timers.setInterval
|
||||||
|
|
||||||
|
# Initialize the "original-fs" module before asar support is loaded.
|
||||||
|
require 'original-fs'
|
||||||
|
|
||||||
# Add support for asar packages.
|
# Add support for asar packages.
|
||||||
require './asar'
|
require './asar'
|
||||||
|
|
Loading…
Reference in a new issue