Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 6e0bc4f. Additionally, this migrates from nwb to rollup so that .js files get bundled along with the .ts{,x} files during the migration. Additionally, this removes the demo since Storybook is a *much* better demo arena.
- Loading branch information
Evan Charlton
committed
Mar 27, 2019
1 parent
b126c8b
commit 9ebfb9f
Showing
32 changed files
with
2,188 additions
and
3,957 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Language: JavaScript | ||
BasedOnStyle: Google | ||
ColumnLimit: 80 |
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,8 +1,12 @@ | ||
.DS_Store | ||
.out | ||
.rpt2_cache/ | ||
/build | ||
/coverage | ||
/demo/dist | ||
/dist | ||
/node_modules | ||
/storybook-static | ||
/umd | ||
es/ | ||
lib/ | ||
|
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,16 @@ | ||
// babel.config.js | ||
module.exports = { | ||
presets: [ | ||
'@babel/preset-env', | ||
// [ | ||
// '@babel/preset-env', | ||
// { | ||
// targets: { | ||
// node: 'current', | ||
// }, | ||
// }, | ||
// ], | ||
'@babel/preset-react', | ||
'@babel/preset-typescript', | ||
], | ||
}; |
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,15 @@ | ||
module.exports = { | ||
roots: ['<rootDir>/tests'], | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest', | ||
'^.+\\.js$': 'babel-jest', | ||
}, | ||
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(tsx|ts|js)?$', | ||
moduleFileExtensions: ['ts', 'js', 'tsx', 'json', 'node'], | ||
coverageDirectory: './coverage/', | ||
collectCoverage: true, | ||
moduleNameMapper: { | ||
'.+\\.(css|styl|less|sass|scss)$': | ||
'<rootDir>/node_modules/jest-css-modules-transform', | ||
}, | ||
}; |
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,7 +1,14 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
type: 'react-component', | ||
npm: { | ||
esModules: true, | ||
umd: false | ||
} | ||
} | ||
umd: false, | ||
}, | ||
webpack: { | ||
extra: { | ||
entry: path.resolve('./build/src'), | ||
}, | ||
}, | ||
}; |
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
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,29 @@ | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import json from 'rollup-plugin-json'; | ||
import typescriptPkg from 'typescript'; | ||
import pkg from './package.json'; | ||
|
||
export default { | ||
input: 'src/index.js', | ||
output: [ | ||
{ | ||
file: pkg.main, | ||
format: 'cjs', | ||
}, | ||
{ | ||
file: pkg.module, | ||
format: 'es', | ||
}, | ||
], | ||
external: [ | ||
...Object.keys(pkg.dependencies || {}), | ||
...Object.keys(pkg.peerDependencies || {}), | ||
], | ||
plugins: [ | ||
typescript({ | ||
typescript: typescriptPkg, | ||
include: ['*.js', '**/*.js', '*.ts', '**/*.ts', '*.tsx', '**/*.tsx'], | ||
}), | ||
json(), | ||
], | ||
}; |
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
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
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 @@ | ||
export type Domain = [number, number]; |
Empty file.
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
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
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,19 @@ | ||
import * as d3 from 'd3'; | ||
import { ScaleContinuousNumeric } from 'd3'; | ||
import { Domain } from '../external'; | ||
|
||
export type ScalerFunction = ScaleContinuousNumeric<number, number>; | ||
|
||
export type ScalerFunctionFactory = (domain: Domain, height: number) => void; | ||
|
||
export const createYScale = (domain: Domain, height: number) => | ||
d3 | ||
.scaleLinear() | ||
.domain(domain) | ||
.range([height, 0]); | ||
|
||
export const createXScale = (domain: Domain, width: number) => | ||
d3 | ||
.scaleLinear() | ||
.domain(domain) | ||
.range([0, width]); |
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
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
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
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
Oops, something went wrong.