JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q35777F
  • License MIT

Electron file interceptor for PostHTML

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

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

Example