Skip to content

Commit fcabee5

Browse files
committedDec 1, 2021
fix: Fix test errors. #28
1 parent 8898683 commit fcabee5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed
 

Diff for: ‎package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
"license": "MIT",
55
"description": "Command line tool generates markdown as html.",
66
"homepage": "https://jaywcjlove.github.io/markdown-to-html-cli/",
7-
"type": "module",
7+
"main": "./lib/index.js",
88
"types": "./lib/index.d.ts",
9-
"exports": "./lib/index.js",
109
"bin": {
1110
"markdown-to-html": "lib/cli.js",
1211
"markdown-to-html-cli": "lib/cli.js"
1312
},
1413
"scripts": {
1514
"start": "node lib/cli.js --github-corners-fork --github-corners 'https://jaywcjlove.github.io'",
16-
"watch": "tsbb watch --disable-babel -f src/cli.ts",
17-
"build": "tsbb build --disable-babel -f src/cli.ts && npm run fix",
15+
"watch": "tsbb watch --no-esm -f src/cli.ts",
16+
"build": "tsbb build --no-esm -f src/cli.ts && npm run fix",
1817
"fix": "tsc-esm-fix --target='lib' --ext='.js'",
1918
"test": "npm run build && tsbb test",
2019
"coverage": "npm run build && tsbb test --coverage"
@@ -73,6 +72,6 @@
7372
"unified": "10.1.1"
7473
},
7574
"devDependencies": {
76-
"tsbb": "3.5.1"
75+
"tsbb": "3.5.2"
7776
}
7877
}

Diff for: ‎src/create.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import { octiconLink } from './nodes/octiconLink';
2727
import { MDToHTMLOptions } from './';
2828

2929
// https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-when-using-the-experimental-modules-flag
30-
export const _dirname = dirname(fileURLToPath(import.meta.url));
30+
// export const _dirname = dirname(fileURLToPath(import.meta.url));
31+
export const _dirname = __dirname;
3132
export interface CreateOptions extends MDToHTMLOptions { }
3233

3334
export function create(options = {} as MDToHTMLOptions) {

Diff for: ‎tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
3-
"module": "ES2020",
3+
"module": "ESNext",
4+
"allowJs": true,
45
// "module": "es2015",
56
"target": "ESNext",
67
"esModuleInterop": true,

0 commit comments

Comments
 (0)