Skip to content

Commit 98b9b09

Browse files
docs(README): add new title, update example
1 parent df584c8 commit 98b9b09

File tree

1 file changed

+14
-32
lines changed

1 file changed

+14
-32
lines changed

README.md

+14-32
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
11
[![NPM][npm]][npm-url]
2-
[![Node][node]][node-url]
3-
[![Dependencies][deps]][deps-url]
4-
[![DevDependencies][devdeps]][devdeps-url]
2+
[![Deps][deps]][deps-url]
3+
[![Tests][travis]][travis-url]
4+
[![Coverage][cover]][cover-url]
55
[![Standard Code Style][style]][style-url]
66

77
<div align="center">
8-
<img width="220" title="Electron" src="https://worldvectorlogo.com/logos/electron-4.svg" />
8+
<img width="260" title="Electron" src="https://worldvectorlogo.com/logos/electron-4.svg" />
99
<img width="220" height="125" title="PostHTML" src="http://posthtml.github.io/posthtml/logo.svg">
10+
<h1>Electron PostHTML Plugin</h1>
1011
</div>
1112

1213
## Install
1314

1415
```bash
15-
$ npm i -S electron-posthtml
16+
npm i -S electron-posthtml
1617
```
1718

1819
## Usage
20+
1921
This modules intercepts the **_file://_** Protocol using [Electrons Protocol API][api]. All HTML files will automatically processed by PostHTML.
2022

2123
[api]: http://electron.atom.io/docs/api/protocol/
2224

2325
```js
2426
'use strict'
2527

26-
const { app, BrowserWindow } = require('electron')
28+
import { app, BrowserWindow } from 'electron'
29+
import posthtml from 'electron-posthtml'
2730

28-
// Load PostHTML
29-
require('electron-posthtml')([/* Plugins */])
31+
// Use PostHTML
32+
posthtml([/* Plugins */])
3033

3134
app.on('ready', () => {
32-
let view = new BrowserWindow({ width: 800, height: 600 })
35+
const view = new BrowserWindow({ width: 800, height: 600 })
3336

34-
view.loadUrl('file://' + __dirname + '/index.html')
37+
view.loadUrl(`file://${__dirname}/index.html`)
3538
})
3639
```
3740

@@ -41,7 +44,7 @@ app.on('ready', () => {
4144

4245
> MIT License (MIT)
4346
44-
> Copyright (c) 2016 Michael Ciniawsky
47+
> Copyright (c) 2016 PostHTML Michael Ciniawsky <michael.ciniawsky@gmail.com>
4548
4649
> Permission is hereby granted, free of charge, to any person obtaining a copy
4750
of this software and associated documentation files (the "Software"), to deal
@@ -64,35 +67,14 @@ SOFTWARE.
6467
[npm]: https://img.shields.io/npm/v/electron-posthtml.svg
6568
[npm-url]: https://npmjs.com/package/electron-posthtml
6669

67-
[node]: https://img.shields.io/node/v/gh-badges.svg?maxAge=2592000
68-
[node-url]: https://nodejs.org
69-
7070
[deps]: https://david-dm.org/posthtml/electron-posthtml.svg
7171
[deps-url]: https://david-dm.org/posthtml/electron-posthtml
7272

73-
[devdeps]: https://david-dm.org/posthtml/electron-posthtml/dev-status.svg
74-
[devdeps-url]: https://david-dm.org/posthtml/electron-posthtml#info=devDependencies
75-
7673
[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg
7774
[style-url]: http://standardjs.com/
7875

7976
[travis]: http://img.shields.io/travis/posthtml/electron-posthtml.svg
8077
[travis-url]: https://travis-ci.org/posthtml/electron-posthtml
8178

82-
[travis-rel]: http://img.shields.io/travis/posthtml/electron-posthtml.svg?branch=release/1.0.0
83-
[travis-rel-url]:https://travis-ci.org/posthtml/electron-posthtml?branch=release/1.0.0
84-
85-
[travis-dev]: http://img.shields.io/travis/posthtml/electron-posthtml.svg?branch=develop
86-
[travis-dev-url]: https://travis-ci.org/posthtml/electron-posthtml?branch=develop
87-
8879
[cover]: https://coveralls.io/repos/github/posthtml/electron-posthtml/badge.svg?branch=master
8980
[cover-url]: https://coveralls.io/github/posthtml/electron-posthtml?branch=master
90-
91-
[cover-rel]: https://coveralls.io/repos/github/posthtml/electron-posthtml/badge.svg?branch=release/1.0.0
92-
[cover-rel-url]: https://coveralls.io/github/posthtml/electron-posthtml?branch=release/1.0.0
93-
94-
[cover-dev]: https://coveralls.io/repos/github/posthtml/electron-posthtml/badge.svg?branch=develop
95-
[cover-dev-url]: https://coveralls.io/github/posthtml/electron-posthtml?branch=develop
96-
97-
[license]: https://img.shields.io/github/license/posthtml/electron-posthtml.svg
98-
[license-url]: https://raw.githubusercontent.com/posthtml/electron-posthtml/master/LICENSE

0 commit comments

Comments
 (0)