Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9ac572
commit b7d6a88
Showing
26 changed files
with
1,195 additions
and
1,162 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ parserOptions: | |
env: | ||
es6: true | ||
node: true | ||
jest: true | ||
plugins: | ||
- import | ||
|
||
|
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,19 @@ | ||
const { resolve } = require('path'); | ||
const CI = !!process.env.CI; | ||
|
||
module.exports = { | ||
transform: { '^.+\\.tsx?$': 'ts-jest' }, | ||
testEnvironment: 'node', | ||
rootDir: process.cwd(), | ||
globals: { | ||
'ts-jest': { | ||
diagnostics: false, | ||
tsConfig: 'tsconfig.json' | ||
} | ||
}, | ||
restoreMocks: true, | ||
reporters: ['default'], | ||
modulePathIgnorePatterns: ['dist'], | ||
collectCoverage: CI, | ||
collectCoverageFrom: ['src', '!src/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
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,30 @@ | ||
import rollup from 'rollup'; | ||
import autoExternal from 'rollup-plugin-auto-external'; | ||
import resolveNode from '@rollup/plugin-node-resolve'; | ||
import rollupTypescript from 'rollup-plugin-typescript2'; | ||
|
||
const commonOutputOptions = { | ||
preferConst: true, | ||
sourcemap: true | ||
}; | ||
|
||
export default { | ||
input: 'src/index.ts', | ||
plugins: [ | ||
resolveNode(), | ||
autoExternal({ builtins: true, dependencies: true, peerDependencies: true }), | ||
rollupTypescript() | ||
], | ||
output: [ | ||
{ | ||
...commonOutputOptions, | ||
file: 'dist/index.cjs.js', | ||
format: 'cjs' | ||
}, | ||
{ | ||
...commonOutputOptions, | ||
file: 'dist/index.esm.js', | ||
format: 'esm' | ||
} | ||
] | ||
}; |
Oops, something went wrong.