0.1.0 • Published 11 years ago

docfragify v0.1.0

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

#docfragify

browserify + html -> document fragments

Usage

first install docfragify in your project npm install docfragify

then include it in your browserify command line

browserify /path/to/entry.js -p docfragify

now, you can require .html files and the resulting document fragment will be returned to you

example

span.html

<span>I'm a fragment!</span>

entry.js

var content = require('./span.html');

document.body.appendChild(content);