electron/lib/common/asar_init.js

15 lines
387 B
JavaScript
Raw Normal View History

2016-03-25 19:57:17 +00:00
;(function () {
return function (process, require, asarSource) {
const source = process.binding('natives')
// Expose fs module without asar support.
source['original-fs'] = source.fs
2016-05-23 17:28:32 +00:00
// Make asar.js accessible via "require".
source.ELECTRON_ASAR = asarSource
2016-01-12 02:40:23 +00:00
2016-01-19 18:25:03 +00:00
// Monkey-patch the fs module.
require('ELECTRON_ASAR').wrapFsWithAsar(require('fs'))
2016-03-25 19:57:17 +00:00
}
})()