Use ts-loader with webpack to avoid needing to compile lib-es3.

This commit is contained in:
David Anson 2021-01-06 19:45:15 -08:00
parent 868310a094
commit 5838b62e6d
7 changed files with 358 additions and 335 deletions

View file

@ -21,7 +21,7 @@
"ci": "npm run test-cover && npm run lint && npm run build-declaration && npm run test-declaration && npm run build-config-schema && git diff --exit-code",
"build-config-schema": "node schema/build-config-schema.js",
"build-declaration": "tsc --allowJs --declaration --emitDeclarationOnly --resolveJsonModule lib/markdownlint.js && rimraf 'lib/{c,md,r}*.d.ts' 'helpers/*.d.ts'",
"build-demo": "cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && tsc --allowJs --resolveJsonModule --outDir ../lib-es3 ../lib/markdownlint.js && cpy ../helpers/package.json ../lib-es3/helpers && webpack",
"build-demo": "cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && webpack",
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
"example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint",
"clone-test-repos": "mkdir test-repos && cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet",
@ -55,6 +55,7 @@
"tape": "~5.0.1",
"tape-player": "~0.1.1",
"toml": "~3.0.0",
"ts-loader": "~8.0.14",
"tv4": "~1.3.0",
"typescript": "~4.1.2",
"webpack": "~5.11.1",