Skip to content

internetarchive/wayback-radial-tree

Repository files navigation

Wayback Radial Tree Build Status

Install

npm install

Usage

The component has few dependencies which should be loaded when it is been used a browser (UMD build):

Usually it is enough to add them at the header of html before <script> of the component:

<script src="https://unpkg.com/d3@7.9.0/dist/d3.min.js"></script>

Fetch data and create site map radial tree

url='example.com'
fetch(`https://web.archive.org/web/timemap/json?
       url=${url}/&
       fl=timestamp:4,urlkey&
       atchType=prefix&
       filter=statuscode:200&
       filter=mimetype:text/html&
       collapse=timestamp:4&
       collapse=urlkey&
       limit=100000`)
  .then(res => res.json())
  .then(data => new wb.RadialTree(
    document.getElementById("rt_container"),
    data,
  ));

If you use this component in an application which uses webpack you don't to worry about dependencies they will be melted inside of build.

Developing

Testing

Right now we run eslint for style checking and jest for unit tests.

yarn test

linting only

yarn lint

unit testing

yarn test

Local Build

Build library and example on webpack and expose example on 5000 port.

yarn example

Production build

Assemble library for production use.

yarn build

In result you will get radial-tree.umd.js (browser-friendly UMD build), radial-tree.cjs.js (CommonJS (for Node)), radial-tree.esm.js (ES module (for bundlers) build) and radial-tree.css with styles.

About

No description, website, or topics provided.

Resources

License

Stars

9 stars

Watchers

16 watching

Forks

Packages

 
 
 

Contributors