https://github.com/posthtml/electron-posthtml
PostHTML for Electron
https://github.com/posthtml/electron-posthtml
Last synced: 10 months ago
JSON representation
PostHTML for Electron
- Host: GitHub
- URL: https://github.com/posthtml/electron-posthtml
- Owner: posthtml
- License: mit
- Created: 2016-02-10T17:04:04.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T13:29:19.000Z (almost 7 years ago)
- Last Synced: 2024-10-29T19:55:06.364Z (over 1 year ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![NPM][npm]][npm-url]
[![Deps][deps]][deps-url]
[![Tests][build]][build-url]
[![Coverage][cover]][cover-url]
[![Standard Code Style][style]][style-url]
[![Chat][chat]][chat-badge]
## Install 
```bash
npm i -S electron-posthtml
```
## Usage
This modules intercepts the **_file://_** Protocol using [Electrons Protocol API][api]. All HTML files will automatically processed by PostHTML.
[api]: http://electron.atom.io/docs/api/protocol/
```js
'use strict'
import { app, BrowserWindow } from 'electron'
import posthtml from 'electron-posthtml'
// Use PostHTML
posthtml([/* Plugins */])
app.on('ready', () => {
const view = new BrowserWindow({ width: 800, height: 600 })
view.loadUrl(`file://${__dirname}/index.html`)
})
```
## [Example](https://github.com/posthtml/electron-posthtml//tree/master/test)
## Maintainers
## Contributing
See [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [contribution guide](CONTRIBUTING.md).
## LICENSE
[MIT](LICENSE)
[npm]: https://img.shields.io/npm/v/electron-posthtml.svg
[npm-url]: https://npmjs.com/package/electron-posthtml
[deps]: https://david-dm.org/posthtml/electron-posthtml.svg
[deps-url]: https://david-dm.org/posthtml/electron-posthtml
[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg
[style-url]: http://standardjs.com/
[build]: http://img.shields.io/travis/posthtml/electron-posthtml.svg
[build-url]: https://travis-ci.org/posthtml/electron-posthtml
[cover]: https://coveralls.io/repos/github/posthtml/electron-posthtml/badge.svg?branch=master
[cover-url]: https://coveralls.io/github/posthtml/electron-posthtml?branch=master
[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg
[style-url]: http://standardjs.com/
[chat]: https://badges.gitter.im/posthtml/posthtml.svg
[chat-badge]: https://gitter.im/posthtml/posthtml?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"