Node.js DOM combiner
npm install dom-combiner
dom-combiner
============
Node.js utility that builds a single page from two or more sources by merging documents and documentFragments created with parse5 into a single object. Subsequent sources overwrites or extends previous sources.
Default behaviours:
- Overwrite declaration
- Overwrite 's content
- Overwrite tags' values
- Append new attributes to unique elements
- Overwrite existing attributes of unique
- Append new elements in and sections to their equivalents
- If the elements are not wrapped in // append them to the element of the previous source
- Treat contents of , , elements as a plain text
Installation
------------
```
npm install dom-combiner
Usage
-----
`javascript`
combine(html_1, html_2, [..., html_n], [callback]);
Example
-------
`javascript
var combine = require('dom-combiner'),
template = '
html = 'Baz';
var output = combine(template, html);
//
Testing
-------
`
npm test
``License
-------
MIT, for license details see: LICENSE.md.