Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding 'in the browser / browserify docs' #89

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ function parse() {

Install [foundation-cli](https://github.com/foundation/foundation-cli) to get the `foundation` command.

### In the browser / with browserify

Include the dist/inky-browser.js script (`<script src="dist/inky-browser.js" charset="utf-8"></script>`) in a page to convert any inky <container> elements to html. Note that you'll want to include the script after any <container> 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('<container> <row> <columns> <p>Hello World!</p> </columns> </row> </container>')
console.log(convertedHtml)
```

## Plugin Settings

- `src` (String): Glob of files to process. You don't need to supply this when using Inky with Gulp.
Expand Down