From c8f89fba14334e1bbecc8e42fc33584a3f11ec12 Mon Sep 17 00:00:00 2001 From: Michael McAndrew Date: Tue, 12 Sep 2017 19:30:35 +0100 Subject: [PATCH] adding in the browser / browserify docs --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 4af247e..99abbfe 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,20 @@ inky src/pages/**/*.html dist --watch Doesn't support advanced settings at the moment. +### In the browser / with browserify + +Include the dist/inky-browser.js script (``) in a page to convert any inky elements to html. Note that you'll want to include the script after any elements on the page. + +Alternatively, you can browserify Inky yourself. Here's a Hello World example that can be browserified with `browserify inky.js -o inky.bundle.js`: + +```js +//inky.js +var Inky = require('inky/lib/inky.js') +inky = new Inky() +convertedHtml = inky.releaseTheKraken('

Hello World!

') +console.log(convertedHtml) +``` + ## Plugin Settings - `src` (String): Glob of files to process. You don't need to supply this when using Inky with Gulp.