@warhol/config-dom

This module reads project configuration for a snapshot run from the DOM using special elements and attributes.

Usage no npm install needed!

<script type="module">
  import warholConfigDom from 'https://cdn.skypack.dev/@warhol/config-dom';
</script>

README

Config DOM reader

This module reads project configuration for a snapshot run from the DOM using special elements and attributes.

Breakpoints can be configured via a meta element:

<meta data-name="breakpoints" content="1280, 1024, 800, 480, 320" />

Components are identified by their warhol-target-selector=".selector" attribute, which maps individual component instances to a canonical selector by which they can be identified and checked in the wild.

License

This project is licensed under MIT.