Updated README.

This commit is contained in:
Alexandre Gigliotti
2015-08-05 15:46:46 -07:00
parent 070fc331e7
commit 8854629943
2 changed files with 9 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
# inline-html # inline-html
Embed local assets into an HTML document. Embed local assets in an HTML document.
[![npm](https://img.shields.io/npm/v/inline-html.svg)]() [![npm](https://img.shields.io/npm/v/inline-html.svg)]()
[![Travis](https://img.shields.io/travis/panosoft/inline-html.svg)]() [![Travis](https://img.shields.io/travis/panosoft/inline-html.svg)]()
@@ -16,7 +16,6 @@ Embed local assets into an HTML document.
This: This:
var inlineHtml = require('inline-html'); var inlineHtml = require('inline-html');
inlineHtml('path/to/file.html').then(function (html) { inlineHtml('path/to/file.html').then(function (html) {
... ...
}); });
@@ -44,12 +43,12 @@ Into this:
Where: Where:
`main.less` - `main.less`
@import (inline) 'main.css'; @import (inline) 'main.css';
div { background-image: url('path/to/file'); } div { background-image: url('path/to/file'); }
`main.css` - `main.css`
@font-face { src: url('path/to/file'); } @font-face { src: url('path/to/file'); }
@@ -84,5 +83,7 @@ Returns a `Promise` that is fulfilled with an `html` string or a `results` objec
#### Results object #### Results object
The `Promise` returned by this function is optionally fulfilled with a `results` object that has the following properties:
- `html` - The inlined html - `html` - The inlined html
- `files` - An array of filenames of the inlined local assets. - `files` - An array of filenames of the inlined local assets.

View File

@@ -1,7 +1,7 @@
{ {
"name": "inline-html", "name": "inline-html",
"version": "0.1.1", "version": "0.1.1",
"description": "Inline an html file.", "description": "Embed local assets in an HTML document.",
"repository": "panosoft/inline-html", "repository": "panosoft/inline-html",
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {