Yeoman generator to scaffold out a D3 v4 plugin boilerplate with typescript
If you want to generate a d3 plugin boilerplate with javascript instead of typescript use the generator-d3-plugin by Akash Goswami.
First, install Yeoman and generator-d3-plugin-ts using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-d3-plugin-tsThen generate your new project:
yo d3-plugin-tsand follow the prompts.
- 
The plugins are build using rollup which is suggested by D3. 
- 
Unit test cases can be written in tape with typescript, tape is added in devDependencies by default. 
- 
The plugin can be tested using npm test.- TDD can be started using npm run test:tdd
- Code Coverage can be started using npm run test:coverage
 
- TDD can be started using 
- 
The plugin can be build using npm run prepublish.
- 
The build is created in /buildfolder.- The typings are created in /build/typingsfolder.
- The ES2015 module is created in /build/jsnextfolder.
- The UMD module is created in /build/folder.
 
- The typings are created in 
- 
Local server with live reloading and TDD can be achieved by running npm start.
- 
The examples are found in the /examplefolder. It is recommended that you use this folder to display an example of your plugin.
Read more about D3 v4 Plugin and reusable chart component for plugins.
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.