From abb3dd95a79b09d74165012947f503c47f1681b9 Mon Sep 17 00:00:00 2001 From: Alexandre Gigliotti Date: Mon, 10 Aug 2015 08:55:40 -0700 Subject: [PATCH] Updated README. --- README.md | 54 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 9a791bb..8599c90 100644 --- a/README.md +++ b/README.md @@ -16,42 +16,52 @@ Inline local assets referenced in an HTML document. This: - var inlineHtml = require('inline-html'); - inlineHtml('path/to/file.html').then(function (html) { - ... - }); +```js +var inlineHtml = require('inline-html'); +inlineHtml('path/to/file.html').then(function (html) { + ... +}); +``` Turns this: - - -
- +```html + + +
+ +``` Into this: - - -
- +```html + + +
+ +``` Where: - `main.less` - @import (inline) 'main.css'; - div { background-image: url('path/to/file'); } +```css +@import (inline) 'main.css'; +div { background-image: url('path/to/file'); } +``` - `main.css` - @font-face { src: url('path/to/file'); } +```css +@font-face { src: url('path/to/file'); } +``` ## API