Browse Source

rename example to demo

pull/14/head
vargburz 11 months ago
parent
commit
43852582b6
  1. 8
      build/webpack.demo.conf.js
  2. 2
      demo/README.md
  3. 6
      demo/demo.html
  4. 4
      demo/demo_pod.ts
  5. 1
      src/index.ts

8
build/webpack.demo.conf.js

@ -5,8 +5,8 @@ function resolve(dir) {
}
module.exports = {
context: resolve('example'),
entry: './example_pod.ts',
context: resolve('demo'),
entry: './demo_pod.ts',
plugins: [],
devtool: 'inline-source-map',
watch: true,
@ -32,8 +32,8 @@ module.exports = {
extensions: ['.ts', '.js'],
},
output: {
filename: 'example.js',
path: resolve('example/dist'),
filename: 'demo.js',
path: resolve('demo/dist'),
libraryTarget: 'umd',
umdNamedDefine: true
}

2
example/README.md → demo/README.md

@ -2,4 +2,4 @@
run `yarn run dev` and `yarn run demo` in separate terminals simultaneously.
open `example.html` in your browser.
open `demo.html` in your browser.

6
example/example.html → demo/demo.html

@ -4,7 +4,7 @@
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script src="./dist/example.js" type="text/javascript"></script>
<script src="./dist/demo.js" type="text/javascript"></script>
</head>
<body>
<div id="chart" style="width: 50%; height: 500px;"></div>
@ -21,11 +21,11 @@
x: { format: 'time' }
},
zoomEvents: {
mouse: { zoom: { isActive: false } },
mouse: { zoom: { isActive: false }, pan: { isActive: false } },
scroll: { zoom: { isActive: false } }
},
}
var pod = new ExamplePod(
var pod = new DemoPod(
document.getElementById('chart'),
[
{ target: 'test1', datapoints: data1, color: 'green' },

4
example/example_pod.ts → demo/demo_pod.ts

@ -8,7 +8,7 @@ import * as d3 from 'd3';
import * as _ from 'lodash';
class ExamplePod extends ChartwerkPod<Serie, Options> {
class DemoPod extends ChartwerkPod<Serie, Options> {
lineGenerator = null;
constructor(
@ -58,4 +58,4 @@ class ExamplePod extends ChartwerkPod<Serie, Options> {
hideSharedCrosshair(): void {}
}
export { ExamplePod };
export { DemoPod };

1
src/index.ts

@ -102,7 +102,6 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
}
public render(): void {
console.log('tut');
this.options.callbackRenderStart();
this.renderClipPath();

Loading…
Cancel
Save