docfragify

0.1.0 • Public • Published

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);
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    3

Package Sidebar

Install

npm i docfragify

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • tmpvar