Skip to content

posthtml/electron-posthtml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electron Logo

PostHTML Electron

File Interceptor for Electron

PostHTML Plugins

PostHTML Packages

Install

(sudo) npm i -S electron-posthtml

npm dependencies

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')
})