Package Exports
- electron-posthtml
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (electron-posthtml) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PostHTML Electron
File Interceptor for Electron
Install
(sudo) npm i -S electron-posthtml
Usage
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')
})