forked from reactchartjs/react-chartjs-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and update deps (reactchartjs#541)
* Refactor and update deps * Refactor and update deps * Add canvas * More canvas
- Loading branch information
1 parent
85bc734
commit 1a7e00a
Showing
18 changed files
with
320 additions
and
8,288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,4 @@ | ||
{ | ||
"env": { | ||
"development": { | ||
"presets": [ | ||
["es2015", { "modules": "commonjs", "loose": true }], | ||
"react", | ||
"stage-1" | ||
] | ||
}, | ||
"rollup": { | ||
"presets": [ | ||
["es2015", { "modules": false, "loose": true }], | ||
"react", | ||
"stage-1" | ||
], | ||
"plugins": [ | ||
"external-helpers" | ||
] | ||
}, | ||
"jsnext": { | ||
"presets": [ | ||
["es2015", { "modules": false, "loose": true }], | ||
"react", | ||
"stage-1" | ||
] | ||
} | ||
} | ||
} | ||
"presets": ["@babel/preset-env", "@babel/preset-react"], | ||
"plugins": ["@babel/plugin-proposal-class-properties"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
version: 2.1 | ||
orbs: | ||
node: circleci/[email protected] | ||
jobs: | ||
build-and-test: | ||
executor: | ||
name: node/default | ||
steps: | ||
- checkout | ||
- node/with-cache: | ||
steps: | ||
- run: yarn | ||
- run: npm test | ||
workflows: | ||
build-and-test: | ||
jobs: | ||
- build-and-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,5 @@ src | |
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.travis.yml | ||
bower.json | ||
rollup.config.js | ||
.babelrc |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import htmlTemplate from "rollup-plugin-generate-html-template"; | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import babel from "@rollup/plugin-babel"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import replace from "@rollup/plugin-replace"; | ||
import alias from "@rollup/plugin-alias"; | ||
import path from "path"; | ||
|
||
const pathResolve = (loc) => path.resolve(__dirname, loc); | ||
|
||
export default { | ||
input: pathResolve("src/index.js"), | ||
output: { | ||
file: pathResolve("dist/js/bundle.js"), | ||
}, | ||
plugins: [ | ||
htmlTemplate({ | ||
template: pathResolve("src/index.html"), | ||
target: pathResolve("dist/index.html"), | ||
}), | ||
resolve(), | ||
babel({ | ||
babelHelpers: "bundled", | ||
exclude: "**/node_modules/**", | ||
}), | ||
commonjs(), | ||
replace({ | ||
"process.env.NODE_ENV": JSON.stringify("development"), | ||
}), | ||
alias({ | ||
entries: [{ find: "react-chartjs-2", replacement: "../../../src" }], | ||
}), | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,82 @@ | ||
<!doctype html> | ||
<!DOCTYPE html> | ||
<head> | ||
<title>react-chartjs-2</title> | ||
<title>react-chartjs-2</title> | ||
</head> | ||
<style> | ||
body { | ||
font-family: Helvetica Neue, Helvetica, Arial, sans-serif; | ||
font-size: 14px; | ||
color: #333; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
a { | ||
color: #08c; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
.container { | ||
margin-left: auto; | ||
margin-right: auto; | ||
max-width: 720px; | ||
padding: 1em; | ||
} | ||
|
||
.footer { | ||
margin-top: 50px; | ||
border-top: 1px solid #eee; | ||
padding: 20px 0; | ||
font-size: 12px; | ||
color: #999; | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
color: #222; | ||
font-weight: 100; | ||
margin: 0.5em 0; | ||
} | ||
|
||
label { | ||
color: #999; | ||
display: inline-block; | ||
font-size: 0.85em; | ||
font-weight: bold; | ||
margin: 1em 0; | ||
text-transform: uppercase; | ||
} | ||
|
||
.hint { | ||
margin: 15px 0; | ||
font-style: italic; | ||
color: #999; | ||
} | ||
</style> | ||
|
||
<body> | ||
<div class="container"> | ||
<h1>react-chartjs-2</h1> | ||
<h2><a href="https://github.com/jerairrest/react-chartjs-2">View project on GitHub</a></h2> | ||
<!-- the example app is rendered into this div --> | ||
<div id="app"></div> | ||
<div class="hint"> | ||
<!-- put any hints about your component example here --> | ||
</div> | ||
<div class="footer"> | ||
Copyright © 2017 Jeremy Ayerst. | ||
</div> | ||
</div> | ||
<div class="container"> | ||
<h1>react-chartjs-2</h1> | ||
<h2> | ||
<a href="https://github.com/jerairrest/react-chartjs-2" | ||
>View project on GitHub</a | ||
> | ||
</h2> | ||
<!-- the example app is rendered into this div --> | ||
<div id="app"></div> | ||
<div class="hint"> | ||
<!-- put any hints about your component example here --> | ||
</div> | ||
<div class="footer"> | ||
Copyright © 2017 Jeremy Ayerst. | ||
</div> | ||
</div> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './components/app'; | ||
|
||
const MOUNT_NODE = document.getElementById('app'); | ||
|
||
const render = () => { | ||
const App = require('./components/app').default; | ||
|
||
ReactDOM.render(<App />, MOUNT_NODE); | ||
ReactDOM.render(<App />, MOUNT_NODE); | ||
}; | ||
|
||
render(); | ||
|
||
if (module.hot) { | ||
module.hot.accept(['./components/app'], () => | ||
setImmediate(() => { | ||
ReactDOM.unmountComponentAtNode(MOUNT_NODE); | ||
render(); | ||
}) | ||
); | ||
} | ||
render(); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.