File tree Expand file tree Collapse file tree 5 files changed +1553
-423
lines changed
Expand file tree Collapse file tree 5 files changed +1553
-423
lines changed Original file line number Diff line number Diff line change 1010 ],
1111 "scripts" : {
1212 "test" : " jest" ,
13- "build" : " tsc " ,
13+ "build" : " rollup -c " ,
1414 "lint" : " tslint --project ./tsconfig.json"
1515 },
1616 "license" : " MIT" ,
1717 "main" : " dist/index.js" ,
18+ "module" : " dist/index.mjs" ,
1819 "types" : " dist/index.d.ts" ,
20+ "peerDependencies" : {
21+ "jest-snapshot" : " >=24"
22+ },
1923 "dependencies" : {
2024 "@types/jest" : " ^24.0.22" ,
21- "jest" : " ^24.9.0" ,
22- "jest-snapshot" : " ^24.9.0"
25+ "jest" : " ^24.9.0"
2326 },
2427 "devDependencies" : {
28+ "@rollup/plugin-node-resolve" : " ^7.0.0" ,
2529 "@kamiazya/jest-dynamic" : " ^0.0.1" ,
2630 "@types/node" : " ^13.1.6" ,
31+ "jest-snapshot" : " ^25.4.0" ,
2732 "prettier" : " ^1.19.1" ,
33+ "rollup" : " ^1.29.0" ,
34+ "rollup-plugin-node-builtins" : " ^2.1.2" ,
35+ "rollup-plugin-typescript2" : " ^0.25.3" ,
2836 "ts-jest" : " ^24.1.0" ,
2937 "tslint" : " ^5.20.1" ,
3038 "tslint-config-prettier" : " ^1.18.0" ,
Original file line number Diff line number Diff line change 1+ import builtins from 'rollup-plugin-node-builtins' ;
2+ import resolve from '@rollup/plugin-node-resolve' ;
3+ import typescript from 'rollup-plugin-typescript2' ;
4+ import pkg from './package.json' ;
5+
6+ export default {
7+ input : './src/index.ts' ,
8+ output : [
9+ {
10+ format : 'cjs' ,
11+ file : pkg . main ,
12+ } ,
13+ {
14+ format : 'esm' ,
15+ file : pkg . module ,
16+ } ,
17+ ] ,
18+ plugins : [
19+ builtins ( ) ,
20+ resolve ( {
21+ preferBuiltins : true ,
22+ } ) ,
23+ typescript ( ) ,
24+ ] ,
25+ external : [
26+ 'jest-snapshot' ,
27+ ] ,
28+ }
Original file line number Diff line number Diff line change 1- import { execSync } from 'child_process' ;
1+ import cp from 'child_process' ;
22
33function execCommand ( command : string , input : string ) : Buffer {
4- return execSync ( command , {
4+ return cp . execSync ( command , {
55 stdio : 'pipe' ,
66 input,
77 } ) ;
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
33 "target" : " es3" ,
4- "module" : " commonjs" ,
54 "strict" : true ,
65 "lib" : [
76 " esnext"
1716 },
1817 "include" : [
1918 " src/**/*.ts"
19+ ],
20+ "exclude" : [
21+ " **/__test__/**/*"
2022 ]
2123}
You can’t perform that action at this time.
0 commit comments