Skip to content

Commit 08a0dee

Browse files
committed
Update types.
1 parent f29f64a commit 08a0dee

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

Diff for: package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "@nosferatu500/textract-lite",
3-
"version": "7.0.0",
3+
"version": "7.0.4",
44
"type": "module",
55
"homepage": "https://github.com/nosferatu500/textract-lite",
66
"description": "Extracting text from files of various type including txt, doc, docx.",
7-
"main": "./dist/index.js",
8-
"types": "./dist/index.d.ts",
7+
"main": "./dist/index",
8+
"types": "./dist/index.d",
99
"author": "David Bashford <[email protected]>",
1010
"contributors": [
1111
{
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"lint": "eslint src/ --ext .js,.jsx,.ts,.tsx --cache",
2525
"test": "mocha",
26-
"clean": "rm -rf dist build package",
26+
"clean": "rimraf dist build package",
2727
"docs": "typedoc --entryPoints src/index.ts",
2828
"clean-types": "rimraf dist/extractors/docx.d.ts && rimraf dist/extractors/text.d.ts && rimraf dist/extract.d.ts && rimraf dist/utils.d.ts",
2929
"build": "npm run clean && tsc -p tsconfig.json && npm run clean-types"

Diff for: src/extract.ts

-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const __dirname = path.dirname(__filename);
99
const extractorPath = path.join(__dirname, "extractors");
1010
const typeExtractors: any = {};
1111
const regexExtractors: any[] = [];
12-
let totalExtractors = 0;
1312
let hasInitialized = false;
1413
function registerExtractor(extractor: any) {
1514
if (extractor.types) {
@@ -41,9 +40,6 @@ async function initializeExtractors() {
4140
for (const extractor of extractors) {
4241
registerExtractor(extractor);
4342
}
44-
45-
// need to keep track of how many extractors we have in total
46-
totalExtractors = extractors.length;
4743
}
4844

4945
function findExtractor(type: string) {

Diff for: tsconfig.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
],
88
"moduleResolution": "Node",
99
"declaration": true,
10+
"declarationDir": "./dist/",
1011
"strict": true,
1112
"strictNullChecks": true,
1213
"strictFunctionTypes": true,
@@ -18,11 +19,8 @@
1819
"allowSyntheticDefaultImports": true,
1920
"sourceMap": false,
2021
"outDir": "./dist/",
21-
"paths": {
22-
"@nosferatu500/textract-lite": [
23-
"./src/index.ts"
24-
]
25-
}
22+
"resolveJsonModule": true,
23+
"isolatedModules": true,
2624
},
2725
"include": [
2826
"src/**/*.ts"

0 commit comments

Comments
 (0)