Skip to content

Commit

Permalink
feat(build): adds ESM outputs, separate types into lib/types dir (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrem authored Dec 12, 2022
1 parent cc4be4e commit a26415d
Show file tree
Hide file tree
Showing 16 changed files with 14,145 additions and 23,062 deletions.
10 changes: 0 additions & 10 deletions babel.config.js

This file was deleted.

8 changes: 8 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": { "node": "current" } }],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
28 changes: 0 additions & 28 deletions jest.config.js

This file was deleted.

28 changes: 28 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"preset": "ts-jest",
"testEnvironment": "jsdom",
"roots": ["<rootDir>/src/"],
"transform": {
"^.+\\.jsx?$": "babel-jest",
"\\.(ts|tsx)$": "ts-jest"
},
"transformIgnorePatterns": ["node_modules/(?!(d3-.+))"],
"moduleNameMapper": {
".*\\.(css|less|styl|scss|sass)$": "<rootDir>/jest/mocks/cssModule.js",
"(.*)\\.js$": "$1"
},
"setupFilesAfterEnv": ["<rootDir>/jest/setup.ts"],
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
"!src/index.js",
"!src/**/*.test.{js,jsx,ts,tsx}"
],
"coverageThreshold": {
"global": {
"statements": 90,
"branches": 84,
"functions": 90,
"lines": 90
}
}
}
4 changes: 2 additions & 2 deletions jest/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import raf from './polyfills/raf'
import raf from './polyfills/raf';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

// @ts-ignore
configure({ adapter: new Adapter() });
configure({ adapter: new Adapter() });
Loading

0 comments on commit a26415d

Please sign in to comment.