Skip to content

Commit 414eee2

Browse files
fix: deal with esm support due to added Angular module support (#139)
1 parent 04bd01d commit 414eee2

File tree

5 files changed

+243
-46
lines changed

5 files changed

+243
-46
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test": "ng test",
99
"lint": "ng lint",
1010
"e2e": "cypress open",
11-
"build-content": "ts-node ./tools/build-checklist.ts",
11+
"build-content": "tsx ./tools/build-checklist.ts",
1212
"build-content:watch": "nodemon",
1313
"ci": "npm run build-content && ng build",
1414
"format:base": "prettier \"{src,tools,cypress}/**/*{.ts,.js,.json,.scss,.html}\"",
@@ -17,7 +17,7 @@
1717
},
1818
"packageManager": "[email protected]",
1919
"engines": {
20-
"node": "18"
20+
"node": "18 || 20"
2121
},
2222
"husky": {
2323
"hooks": {
@@ -104,7 +104,7 @@
104104
"prettier": "^1.15.2",
105105
"shorthash": "^0.0.2",
106106
"ts-loader": "^5.3.1",
107-
"ts-node": "~8.3.0",
107+
"tsx": "^4.15.6",
108108
"typescript": "~5.3.3"
109109
}
110110
}

tools/markdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as MarkdownIt from 'markdown-it';
1+
import MarkdownIt from 'markdown-it';
22
import hljs from 'highlight.js';
33

44
export const convertHeadingsPlugin = (md, options) => {

tools/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { existsSync, mkdirSync, readFileSync, readdir, writeFileSync } from 'fs'
33
import { dirname, join, parse } from 'path';
44
import { convertHeadingsPlugin, markdown } from './markdown';
55
import { FrontMatter } from './models';
6-
import * as matter from 'gray-matter';
6+
import matter from 'gray-matter';
77
import { unique } from 'shorthash';
88

99
markdown.use(convertHeadingsPlugin);

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"es2020",
2121
"dom"
2222
],
23-
"useDefineForClassFields": false
23+
"useDefineForClassFields": false,
24+
"allowSyntheticDefaultImports": true
2425
},
2526
"angularCompilerOptions": {
2627
"enableI18nLegacyMessageIdFormat": false,

0 commit comments

Comments
 (0)