PostHTML Electron
File Interceptor for Electron
(sudo) npm i -S electron-posthtml
This modules intercepts the file:// Protocol using Electrons Protocol API. All HTML files will automatically be processed by PostHTML.
'use strict'
const app = require('electron').app
const BrowserWindow = require('electron').BrowserWindow
const posthtml = require('electron-posthtml')([/* PostHTML Plugins */])
app.on('ready', () => {
// Main Window
view = new BrowserWindow({ width: 800, height: 600 })
view.loadUrl('file://' + __dirname + '/index.html')
})