Skip to content

Commit

Permalink
feat(code style): add prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Dec 5, 2017
1 parent e4cf806 commit 9a550eb
Show file tree
Hide file tree
Showing 66 changed files with 545 additions and 517 deletions.
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
printWidth: 100
tabWidth: 4
bracketSpacing: true
semi: false
trailingComma: es5
singleQuote: true
arrowParens: avoid
23 changes: 18 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ init: ##@init cleanup/install/bootstrap
@make packages-build
@cd website && yarn install

########################################################################################################################
#
# GLOBAL
#
########################################################################################################################

fmt: ##@global format code using prettier (js, css, md)
@./node_modules/.bin/prettier --color --write \
"packages/*/{src,stories,tests}/**/*.js" \
"packages/*/README.md" \
"website/src/**/*.{js,css}" \
"examples/*/src/**/*.{js,css}" \
"README.md"

deploy-all: ##@global deploy website & storybook
@make website-deploy
@make storybook-deploy

########################################################################################################################
#
# CLEANUP
Expand Down Expand Up @@ -134,8 +152,3 @@ storybook-deploy: ##@storybook build and deploy storybook

@echo "${YELLOW}Deploying storybook${RESET}"
@./node_modules/.bin/gh-pages -d storybook-static -r [email protected]:plouc/nivo.git -b gh-pages -e storybook


deploy-all: ##@deploy deploy website & storybook
@make website-deploy
@make storybook-deploy
174 changes: 87 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,111 +23,111 @@ yarn add @nivo/core @nivo/bar ...

## Features

- Highly customizable
- Motion/transitions, powered by [react-motion](https://github.com/chenglou/react-motion)
- [Component playground](http://nivo.rocks)
- [Exhaustive documentation](http://nivo.rocks)
- Isomorphic rendering
- [SVG charts](http://nivo.rocks/#/components?filter=svg)
- [HTML charts](http://nivo.rocks/#/components?filter=html)
- [Canvas charts](http://nivo.rocks/#/components?filter=canvas)
- [server side rendering API](https://github.com/plouc/nivo-api)
- [SVG patterns](http://nivo.rocks/#/guides/patterns)
- [Gradients](http://nivo.rocks/#/guides/gradients)
- [responsive charts](http://nivo.rocks/#/components?q=responsive)
* Highly customizable
* Motion/transitions, powered by [react-motion](https://github.com/chenglou/react-motion)
* [Component playground](http://nivo.rocks)
* [Exhaustive documentation](http://nivo.rocks)
* Isomorphic rendering
* [SVG charts](http://nivo.rocks/#/components?filter=svg)
* [HTML charts](http://nivo.rocks/#/components?filter=html)
* [Canvas charts](http://nivo.rocks/#/components?filter=canvas)
* [server side rendering API](https://github.com/plouc/nivo-api)
* [SVG patterns](http://nivo.rocks/#/guides/patterns)
* [Gradients](http://nivo.rocks/#/guides/gradients)
* [responsive charts](http://nivo.rocks/#/components?q=responsive)

## Discussion

Join the [nivo discord community](https://discord.gg/n7Ft74f).

## Components

- Bar `@nivo/bar`
- [`<Bar/>`](http://nivo.rocks/#/bar)
- [`<ResponsiveBar/>`](http://nivo.rocks/#/bar)
- [`<BarCanvas/>`](http://nivo.rocks/#/bar/canvas)
- [`<ResponsiveBarCanvas/>`](http://nivo.rocks/#/bar/canvas)
- Bubble `@nivo/circle-packing`
- [`<Bubble/>`](http://nivo.rocks/#/bubble)
- [`<ResponsiveBubble/>`](http://nivo.rocks/#/bubble)
- [`<BubbleHtml/>`](http://nivo.rocks/#/bubble/html)
- [`<ResponsiveBubbleHtml/>`](http://nivo.rocks/#/bubble/html)
- [`<BubbleCanvas/>`](http://nivo.rocks/#/bubble/canvas)
- [`<ResponsiveBubbleCanvas/>`](http://nivo.rocks/#/bubble/canvas)
- Calendar `@nivo/calendar`
- [`<Calendar/>`](http://nivo.rocks/#/calendar)
- [`<ResponsiveCalendar/>`](http://nivo.rocks/#/calendar)
- Chord `@nivo/chord`
- [`<Chord/>`](http://nivo.rocks/#/chord)
- [`<ResponsiveChord/>`](http://nivo.rocks/#/chord)
- [`<ChordCanvas/>`](http://nivo.rocks/#/chord/canvas)
- [`<ResponsiveChordCanvas/>`](http://nivo.rocks/#/chord/canvas)
- HeatMap `@nivo/heatmap`
- [`<HeatMap/>`](http://nivo.rocks/#/heatmap)
- [`<ResponsiveHeatMap/>`](http://nivo.rocks/#/heatmap)
- [`<HeatMapCanvas/>`](http://nivo.rocks/#/heatmap/canvas)
- [`<ResponsiveHeatMapCanvas/>`](http://nivo.rocks/#/heatmap/canvas)
- Line `@nivo/line`
- [`<Line/>`](http://nivo.rocks/#/line)
- [`<ResponsiveLine/>`](http://nivo.rocks/#/line)
- Pie `@nivo/pie`
- [`<Pie/>`](http://nivo.rocks/#/pie)
- [`<ResponsivePie/>`](http://nivo.rocks/#/pie)
- Radar `@nivo/radar`
- [`<Radar/>`](http://nivo.rocks/#/radar)
- [`<ResponsiveRadar/>`](http://nivo.rocks/#/radar)
- Sankey `@nivo/sankey`
- [`<Sankey/>`](http://nivo.rocks/#/sankey)
- [`<ResponsiveSankey/>`](http://nivo.rocks/#/sankey)
- Stream `@nivo/stream`
- [`<Stream/>`](http://nivo.rocks/#/stream)
- [`<ResponsiveStream/>`](http://nivo.rocks/#/stream)
- Sunburst `@nivo/sunburst`
- [`<Sunburst/>`](http://nivo.rocks/#/sunburst)
- [`<ResponsiveSunburst/>`](http://nivo.rocks/#/sunburst)
- TreeMap `@nivo/treemap`
- [`<TreeMap/>`](http://nivo.rocks/#/treemap)
- [`<ResponsiveTreeMap/>`](http://nivo.rocks/#/treemap)
- [`<TreeMapHTML/>`](http://nivo.rocks/#/treemap/html)
- [`<ResponsiveTreeMapHTML/>`](http://nivo.rocks/#/treemap/html)
- [`<TreeMapCanvas/>`](http://nivo.rocks/#/treemap/canvas)
- [`<ResponsiveTreeMapCanvas/>`](http://nivo.rocks/#/treemap/canvas)
- Voronoi `@nivo/voronoi`
- [`<Voronoi/>`](http://nivo.rocks/#/voronoi)
- [`<ResponsiveVoronoi/>`](http://nivo.rocks/#/voronoi)
* Bar `@nivo/bar`
* [`<Bar/>`](http://nivo.rocks/#/bar)
* [`<ResponsiveBar/>`](http://nivo.rocks/#/bar)
* [`<BarCanvas/>`](http://nivo.rocks/#/bar/canvas)
* [`<ResponsiveBarCanvas/>`](http://nivo.rocks/#/bar/canvas)
* Bubble `@nivo/circle-packing`
* [`<Bubble/>`](http://nivo.rocks/#/bubble)
* [`<ResponsiveBubble/>`](http://nivo.rocks/#/bubble)
* [`<BubbleHtml/>`](http://nivo.rocks/#/bubble/html)
* [`<ResponsiveBubbleHtml/>`](http://nivo.rocks/#/bubble/html)
* [`<BubbleCanvas/>`](http://nivo.rocks/#/bubble/canvas)
* [`<ResponsiveBubbleCanvas/>`](http://nivo.rocks/#/bubble/canvas)
* Calendar `@nivo/calendar`
* [`<Calendar/>`](http://nivo.rocks/#/calendar)
* [`<ResponsiveCalendar/>`](http://nivo.rocks/#/calendar)
* Chord `@nivo/chord`
* [`<Chord/>`](http://nivo.rocks/#/chord)
* [`<ResponsiveChord/>`](http://nivo.rocks/#/chord)
* [`<ChordCanvas/>`](http://nivo.rocks/#/chord/canvas)
* [`<ResponsiveChordCanvas/>`](http://nivo.rocks/#/chord/canvas)
* HeatMap `@nivo/heatmap`
* [`<HeatMap/>`](http://nivo.rocks/#/heatmap)
* [`<ResponsiveHeatMap/>`](http://nivo.rocks/#/heatmap)
* [`<HeatMapCanvas/>`](http://nivo.rocks/#/heatmap/canvas)
* [`<ResponsiveHeatMapCanvas/>`](http://nivo.rocks/#/heatmap/canvas)
* Line `@nivo/line`
* [`<Line/>`](http://nivo.rocks/#/line)
* [`<ResponsiveLine/>`](http://nivo.rocks/#/line)
* Pie `@nivo/pie`
* [`<Pie/>`](http://nivo.rocks/#/pie)
* [`<ResponsivePie/>`](http://nivo.rocks/#/pie)
* Radar `@nivo/radar`
* [`<Radar/>`](http://nivo.rocks/#/radar)
* [`<ResponsiveRadar/>`](http://nivo.rocks/#/radar)
* Sankey `@nivo/sankey`
* [`<Sankey/>`](http://nivo.rocks/#/sankey)
* [`<ResponsiveSankey/>`](http://nivo.rocks/#/sankey)
* Stream `@nivo/stream`
* [`<Stream/>`](http://nivo.rocks/#/stream)
* [`<ResponsiveStream/>`](http://nivo.rocks/#/stream)
* Sunburst `@nivo/sunburst`
* [`<Sunburst/>`](http://nivo.rocks/#/sunburst)
* [`<ResponsiveSunburst/>`](http://nivo.rocks/#/sunburst)
* TreeMap `@nivo/treemap`
* [`<TreeMap/>`](http://nivo.rocks/#/treemap)
* [`<ResponsiveTreeMap/>`](http://nivo.rocks/#/treemap)
* [`<TreeMapHTML/>`](http://nivo.rocks/#/treemap/html)
* [`<ResponsiveTreeMapHTML/>`](http://nivo.rocks/#/treemap/html)
* [`<TreeMapCanvas/>`](http://nivo.rocks/#/treemap/canvas)
* [`<ResponsiveTreeMapCanvas/>`](http://nivo.rocks/#/treemap/canvas)
* Voronoi `@nivo/voronoi`
* [`<Voronoi/>`](http://nivo.rocks/#/voronoi)
* [`<ResponsiveVoronoi/>`](http://nivo.rocks/#/voronoi)

## [HTTP API](https://github.com/plouc/nivo-api)

- [`<Bar/>`](https://nivo-api.herokuapp.com/samples/bar.svg)
- [`<Bubble/>`](https://nivo-api.herokuapp.com/samples/bubble.svg)
- [`<Chord/>`](https://nivo-api.herokuapp.com/samples/chord.svg)
- [`<HeatMap/>`](https://nivo-api.herokuapp.com/samples/heatmap.svg)
- [`<Line/>`](https://nivo-api.herokuapp.com/samples/line.svg)
- [`<Pie/>`](https://nivo-api.herokuapp.com/samples/pie.svg)
- [`<Radar/>`](https://nivo-api.herokuapp.com/samples/radar.svg)
- [`<Sankey/>`](https://nivo-api.herokuapp.com/samples/sankey.svg)
- [`<Sunburst/>`](https://nivo-api.herokuapp.com/samples/sunburst.svg)
- [`<TreeMap/>`](https://nivo-api.herokuapp.com/samples/treemap.svg)
* [`<Bar/>`](https://nivo-api.herokuapp.com/samples/bar.svg)
* [`<Bubble/>`](https://nivo-api.herokuapp.com/samples/bubble.svg)
* [`<Chord/>`](https://nivo-api.herokuapp.com/samples/chord.svg)
* [`<HeatMap/>`](https://nivo-api.herokuapp.com/samples/heatmap.svg)
* [`<Line/>`](https://nivo-api.herokuapp.com/samples/line.svg)
* [`<Pie/>`](https://nivo-api.herokuapp.com/samples/pie.svg)
* [`<Radar/>`](https://nivo-api.herokuapp.com/samples/radar.svg)
* [`<Sankey/>`](https://nivo-api.herokuapp.com/samples/sankey.svg)
* [`<Sunburst/>`](https://nivo-api.herokuapp.com/samples/sunburst.svg)
* [`<TreeMap/>`](https://nivo-api.herokuapp.com/samples/treemap.svg)

## Guides
- [colors](http://nivo.rocks/#/guides/colors)
- [gradients](http://nivo.rocks/#/guides/gradients)
- [patterns](http://nivo.rocks/#/guides/patterns)

* [colors](http://nivo.rocks/#/guides/colors)
* [gradients](http://nivo.rocks/#/guides/gradients)
* [patterns](http://nivo.rocks/#/guides/patterns)

## Repositories

- [nivo](https://github.com/plouc/nivo) - the nivo library
- [nivo-api](https://github.com/plouc/nivo-api) - the nivo http api
- [nivo-api-docker](https://github.com/plouc/nivo-api-docker) - a Docker image for the nivo http api
- [nivo-generators](https://github.com/plouc/nivo-generators) - the data generators used for nivo-website and http API samples
* [nivo](https://github.com/plouc/nivo) - the nivo library
* [nivo-api](https://github.com/plouc/nivo-api) - the nivo http api
* [nivo-api-docker](https://github.com/plouc/nivo-api-docker) - a Docker image for the nivo http api
* [nivo-generators](https://github.com/plouc/nivo-generators) - the data generators used for nivo-website and http API samples

## Credits

- [d3](https://d3js.org/)
- [react](https://facebook.github.io/react/)
- [react-motion](https://github.com/chenglou/react-motion)
-
* [d3](https://d3js.org/)
* [react](https://facebook.github.io/react/)
* [react-motion](https://github.com/chenglou/react-motion)
*

[license-image]: https://img.shields.io/github/license/plouc/nivo.svg?style=flat-square
[license-url]: https://github.com/plouc/nivo/blob/master/LICENSE.md
Expand Down
118 changes: 59 additions & 59 deletions examples/retro/src/App.css
Original file line number Diff line number Diff line change
@@ -1,87 +1,87 @@
.Background {
position: fixed;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
z-index: 10;
opacity: 1;
position: fixed;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
z-index: 10;
opacity: 1;
}

.App {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 100;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
grid-column-gap: 30px;
grid-row-gap: 20px;
padding: 30px;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 100;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
grid-column-gap: 30px;
grid-row-gap: 20px;
padding: 30px;
}

.App > div {
overflow: hidden;
display: flex;
overflow: hidden;
display: flex;
}

.Title {
border: 3px solid #000;
width: 52px;
background: #f2e7c8;
writing-mode: vertical-rl;
display: flex;
align-items: center;
text-orientation: sideways;
padding: 20px 0;
font-family: 'Montserrat', sans-serif;
font-weight: 600;
border: 3px solid #000;
width: 52px;
background: #f2e7c8;
writing-mode: vertical-rl;
display: flex;
align-items: center;
text-orientation: sideways;
padding: 20px 0;
font-family: 'Montserrat', sans-serif;
font-weight: 600;
}

.Info {
display: flex;
flex-direction: column;
justify-content: space-between;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.Brand {
margin: 0;
padding: 0;
font-family: 'Montserrat', sans-serif;
font-size: 96px;
font-weight: 900;
color: #000;
line-height: 70px;
margin: 0;
padding: 0;
font-family: 'Montserrat', sans-serif;
font-size: 96px;
font-weight: 900;
color: #000;
line-height: 70px;
}

.Links {
width: 100%;
display: flex;
border: 3px solid #000;
background: #f2e7c8;
font-family: 'Montserrat', sans-serif;
font-weight: 600;
font-size: 14px;
width: 100%;
display: flex;
border: 3px solid #000;
background: #f2e7c8;
font-family: 'Montserrat', sans-serif;
font-weight: 600;
font-size: 14px;
}

.Links a {
flex: 1;
border-left: 1px solid #000;
text-align: center;
padding: 12px 0;
cursor: pointer;
flex: 1;
border-left: 1px solid #000;
text-align: center;
padding: 12px 0;
cursor: pointer;
}

.Links a:first-child {
border-left: none;
border-left: none;
}

.Links a:hover {
background: #000;
color: #f2e7c8;
}
background: #000;
color: #f2e7c8;
}
Loading

0 comments on commit 9a550eb

Please sign in to comment.