Skip to content

micnews/dom-to-vdom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dom-to-vdom Build Status

Get virtual dom from normal browser dom

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install dom-to-vdom --save

Usage

import setupDomToVdom from 'dom-to-vdom';
// works with any jsx compatible element
// this example uses deku@2
import {element, string} from 'deku';

const domToVdom = setupDomToVdom({element});

const vdom = domToVdom(document.querySelector('#element'));

console.log(string.render(vdom));

Tests

npm install
npm test

Dependencies

None

Dev Dependencies

  • ava: Futuristic test runner 🚀
  • babel-cli: Babel command line.
  • babel-core: Babel compiler core.
  • babel-preset-es2015: Babel preset for all es2015 plugins.
  • deku: Create view components using a virtual DOM
  • package-json-to-readme: Generate a README.md from package.json contents
  • query-dom: query-focused & somewhat standards compliant subset of the DOM
  • semistandard: All the goodness of feross/standard with semicolons sprinkled on top.
  • snazzy: Format JavaScript Standard Style as Stylish (i.e. snazzy) output
  • virtual-element: Build virtual tree elements

License

MIT

Generated by package-json-to-readme

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published