Skip to content

Commit

Permalink
ascii-53: fix exports
Browse files Browse the repository at this point in the history
  • Loading branch information
gtktsc committed Sep 18, 2023
1 parent 6616996 commit 853259b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 42 deletions.
16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
{
"name": "simple-ascii-chart",
"version": "4.0.0",
"version": "4.0.1",
"description": "Simple ascii chart generator",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
"exports": {
".": {
"import": {
"types": "./dist/mjs/index.d.ts",
"default": "./dist/mjs/index.js"
},
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
}
"import": "./dist/mjs/index.js",
"require": "./dist/cjs/index.js"
}
},
"types": "dist/types/index.d.ts",
"scripts": {
"start": "tsc-watch -p tsconfig.json --preserveWatchOutput -w --onSuccess 'node ./dist/index.js'",
"lint": "eslint . --ext .ts,.js",
"lint:fix": "eslint . --ext .ts,.js --fix",
"test": "jest --coverage",
"test:watch": "jest --watch",
"build": "rm -fr dist/* && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json && ./fixup.sh",
"build:types": "tsc --emitDeclarationOnly --declaration --outDir dist/types",
"build": "rm -fr dist/* && tsc -p tsconfig-mjs.json && tsc -p tsconfig-cjs.json && ./fixup.sh && npm run build:types",
"prepare": "husky install",
"prepublishOnly": "npm test && npm run lint",
"preversion": "npm run lint",
Expand Down
17 changes: 10 additions & 7 deletions tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "dist/cjs",
"target": "es2015"
}
}
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "Node16",
"moduleResolution": "Node16",
"outDir": "dist/cjs"
},
"ts-node": {
"transpileOnly": true
}
}
9 changes: 0 additions & 9 deletions tsconfig-esm.json

This file was deleted.

10 changes: 10 additions & 0 deletions tsconfig-mjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "es2020",
"moduleResolution": "node",
"outDir": "dist/mjs",
"downlevelIteration": true,

}
}
7 changes: 0 additions & 7 deletions tsconfig.build.json

This file was deleted.

19 changes: 10 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"include": ["src"],
"exclude": ["node_modules", "dist"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"allowJs": true,
"esModuleInterop": true,
"declaration": true,
"alwaysStrict": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"strict": true,
"downlevelIteration": true,
"skipLibCheck": true,
"typeRoots": ["./src/types", "node_modules/@types"],
"target": "es2020",
"rootDirs": ["src"],
},
"include": ["./src"],
"target": "esnext",
}

0 comments on commit 853259b

Please sign in to comment.