File tree Expand file tree Collapse file tree 5 files changed +275
-6
lines changed Expand file tree Collapse file tree 5 files changed +275
-6
lines changed Original file line number Diff line number Diff line change 1- module . exports = {
1+ export default {
22 preset : 'ts-jest' ,
33 testEnvironment : 'node' ,
44 transform : {
Original file line number Diff line number Diff line change 11{
22 "name" : " @includedaniel/fibonacci" ,
3- "version" : " 1.0.14 " ,
3+ "version" : " 1.0.15 " ,
44 "description" : " 📦 package who finds a correspondent fibonacci term" ,
55 "main" : " dist/index.js" ,
6+ "module" : " dist/index.mjs" ,
67 "types" : " dist/index.d.ts" ,
8+ "type" : " module" ,
79 "scripts" : {
810 "test" : " jest --coverage" ,
911 "lint" : " eslint . --ext ts --ext tsx --ext js --ext snap" ,
1012 "type-check" : " tsc --pretty --noEmit" ,
1113 "format" : " prettier --write ." ,
12- "build" : " tsc --project tsconfig.build.json "
14+ "build" : " rollup -c "
1315 },
1416 "files" : [
1517 " dist"
3739 "devDependencies" : {
3840 "@types/jest" : " ^29.5.2" ,
3941 "@typescript-eslint/eslint-plugin" : " ^5.43.0" ,
42+ "esbuild" : " ^0.18.17" ,
4043 "eslint" : " ^8.0.1" ,
4144 "eslint-config-standard-with-typescript" : " ^34.0.1" ,
4245 "eslint-plugin-import" : " ^2.25.2" ,
4548 "eslint-plugin-promise" : " ^6.0.0" ,
4649 "jest" : " ^29.5.0" ,
4750 "prettier" : " ^2.8.8" ,
51+ "rollup" : " ^3.27.0" ,
52+ "rollup-plugin-dts" : " ^5.3.0" ,
53+ "rollup-plugin-esbuild" : " ^5.0.0" ,
4854 "ts-jest" : " ^29.1.0" ,
4955 "typescript" : " *"
5056 }
Original file line number Diff line number Diff line change 1+ import dts from 'rollup-plugin-dts'
2+ import esbuild from 'rollup-plugin-esbuild'
3+ import packageJson from './package.json' assert { type : 'json ' }
4+
5+ const name = packageJson . main . replace ( / \. j s $ / , '' )
6+
7+ const bundle = config => ( {
8+ ...config ,
9+ input : 'src/index.ts' ,
10+ external : id => ! / ^ [ . / ] / . test ( id )
11+ } )
12+
13+ export default [
14+ bundle ( {
15+ plugins : [ esbuild ( ) ] ,
16+ output : [
17+ {
18+ file : `${ name } .js` ,
19+ format : 'cjs' ,
20+ sourcemap : true
21+ } ,
22+ {
23+ file : `${ name } .mjs` ,
24+ format : 'es' ,
25+ sourcemap : true
26+ }
27+ ]
28+ } ) ,
29+ bundle ( {
30+ plugins : [ dts ( ) ] ,
31+ output : {
32+ file : `${ name } .d.ts` ,
33+ format : 'es'
34+ }
35+ } )
36+ ]
Original file line number Diff line number Diff line change 99 // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1010 // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
1111 /* Language and Environment */
12- "target" : " ES5 " /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ ,
12+ "target" : " esnext " /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ ,
1313 "lib" : [
1414 " es6" ,
1515 " dom" ,
You can’t perform that action at this time.
0 commit comments