Skip to content

Commit a26415d

Browse files
authored
feat(build): adds ESM outputs, separate types into lib/types dir (bkrem#425)
1 parent cc4be4e commit a26415d

16 files changed

+14145
-23062
lines changed

babel.config.js

-10
This file was deleted.

babel.config.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": [
3+
["@babel/preset-env", { "targets": { "node": "current" } }],
4+
"@babel/preset-typescript",
5+
"@babel/preset-react"
6+
],
7+
"plugins": ["@babel/plugin-proposal-class-properties"]
8+
}

jest.config.js

-28
This file was deleted.

jest.config.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"preset": "ts-jest",
3+
"testEnvironment": "jsdom",
4+
"roots": ["<rootDir>/src/"],
5+
"transform": {
6+
"^.+\\.jsx?$": "babel-jest",
7+
"\\.(ts|tsx)$": "ts-jest"
8+
},
9+
"transformIgnorePatterns": ["node_modules/(?!(d3-.+))"],
10+
"moduleNameMapper": {
11+
".*\\.(css|less|styl|scss|sass)$": "<rootDir>/jest/mocks/cssModule.js",
12+
"(.*)\\.js$": "$1"
13+
},
14+
"setupFilesAfterEnv": ["<rootDir>/jest/setup.ts"],
15+
"collectCoverageFrom": [
16+
"src/**/*.{js,jsx,ts,tsx}",
17+
"!src/index.js",
18+
"!src/**/*.test.{js,jsx,ts,tsx}"
19+
],
20+
"coverageThreshold": {
21+
"global": {
22+
"statements": 90,
23+
"branches": 84,
24+
"functions": 90,
25+
"lines": 90
26+
}
27+
}
28+
}

jest/setup.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import raf from './polyfills/raf'
1+
import raf from './polyfills/raf';
22
import { configure } from 'enzyme';
33
import Adapter from 'enzyme-adapter-react-16';
44

55
// @ts-ignore
6-
configure({ adapter: new Adapter() });
6+
configure({ adapter: new Adapter() });

0 commit comments

Comments
 (0)