Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

BastiTee/d3-plugin-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

d3-plugin-boilerplate

A ready-to-dine boilerplate for d3-plugins

alt text

This ready-to-dine boilerplate for d3-plug-ins is designed, so you'll be able to immediately start working on your plug-in's core implementation. You only require a fork! The boilerplate targets D3v4 and applies the best practices from:

Getting started

  • Fork this repository and clone your fork
  • Change to the repository folder
  • Run npm install
  • Start the example by running a standalone server like python -m SimpleHTTPServer or http-server (node install -g http-server)
  • Open browser at http://localhost:8000/example/index.html

Content

The plug-in implemented in this boilerplate doesn't do much obviously. It basically creates a rectangle per dataset in example/data.csv and the given width and height.

See individual files for more documentation. After you've built the plug-in with npm install or npm run prepublish you'll find the shippable artifacts inside the build/ folder.

Scripts

Using npm run the following scripts are available:

  • pretest – Pre-testing script that bundles your plug-in into a single file to build/ so you'll be able to test using example/
  • test – Runs your test suite against the plug-in implementation
  • prepublish – Bundles your plug-in into a single file and its minified version to build/

Additionally the following scripts are available:

To-Do's

  • Select a license
  • Generalize package.json
  • Include some library for demonstration
  • Document content of repository
  • Document the pretest, prepublish, test scripts
  • Reestablish a post-publish npm script

License

Code is licensed under Apache License Version 2.0.

Icon made by Freepik from Flaticon is licensed by CC 3.0 BY a

Releases

No releases published

Packages

No packages published