Skip to content

Raoul1996/D3-webpack-boilerplate

 
 

Repository files navigation

D3 webpack boilerplate

D3 webpack 4 boilerplate

Install dependencies

$ npm install

Or using yarn

$ yarn install

2. Run server

$ npm start

Or using yarn

$ yarn start

Now you can open you browser and go to http://localhost:8080/. You should see the D3 version this project uses, which is provided by the snippet shown below (also available in index.js).

import * as d3 from 'd3'

d3.select('#root')
  .append('h5')
  .append('text')
  .text(`D3 version: ${d3.version}`)

Build

If you wanna generate the minified files for the project you can simply run the command below.

$ npm run build

Or using yarn

$ yarn run build
// Loading external data, use webpack file-loader
d3.csv('/assets/sample.csv', (error, dataset) => {
  dataset.forEach((data) => {
    console.log(data)
  })
})

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.0%
  • HTML 3.4%
  • CSS 0.6%