electron/npm/index.js

11 lines
338 B
JavaScript
Raw Normal View History

2014-10-20 13:56:49 +09:00
var fs = require('fs')
var path = require('path')
2014-11-15 10:21:07 +01:00
2016-12-27 19:26:05 +13:00
var pathFile = path.join(__dirname, 'path.txt')
2016-12-27 12:17:48 +13:00
if (fs.existsSync(pathFile)) {
module.exports = path.join(__dirname, fs.readFileSync(pathFile, 'utf-8'))
} else {
2017-02-08 11:36:38 -08:00
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
2016-12-27 12:17:48 +13:00
}