index.js 338 B

12345678910
  1. var fs = require('fs')
  2. var path = require('path')
  3. var pathFile = path.join(__dirname, 'path.txt')
  4. if (fs.existsSync(pathFile)) {
  5. module.exports = path.join(__dirname, fs.readFileSync(pathFile, 'utf-8'))
  6. } else {
  7. throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
  8. }