mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-01-23 00:06:08 +01:00
Fixed nodemon + TS incompatability
This commit is contained in:
parent
458e9ed75b
commit
2cb2116940
@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npx tsc",
|
"build": "npx tsc",
|
||||||
"start": "node dist/index.js",
|
"start": "node dist/index.js",
|
||||||
"dev": "nodemon index.ts"
|
"dev": "nodemon --watch './**/*.ts' --exec 'node --experimental-specifier-resolution=node --loader ts-node/esm' ./index.ts"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
@ -26,5 +26,7 @@
|
|||||||
"@types/express": "^4.17.21",
|
"@types/express": "^4.17.21",
|
||||||
"ts-node-dev": "^2.0.0",
|
"ts-node-dev": "^2.0.0",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.2.2"
|
||||||
}
|
},
|
||||||
|
"exports": "./dist/index.js",
|
||||||
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
||||||
|
|
||||||
/* Modules */
|
/* Modules */
|
||||||
"module": "commonjs", /* Specify what module code is generated. */
|
"module": "ES2020", /* Specify what module code is generated. */
|
||||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||||
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
"moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { DocumentInitParameters, PDFPageProxy } from "pdfjs-dist/types/src/display/api.js";
|
import { DocumentInitParameters, PDFPageProxy } from "pdfjs-dist/types/src/display/api.js";
|
||||||
import PDFJS from 'pdfjs-dist';
|
import * as PDFJS from 'pdfjs-dist';
|
||||||
import { Image } from 'image-js';
|
import { Image } from 'image-js';
|
||||||
|
|
||||||
import { getImagesOnPage } from "./getImagesOnPage.js";
|
import { getImagesOnPage } from "./getImagesOnPage.js";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
import { PDFPageProxy } from "pdfjs-dist/types/src/display/api.js";
|
import { PDFPageProxy } from "pdfjs-dist/types/src/display/api.js";
|
||||||
import PDFJS from 'pdfjs-dist';
|
import * as PDFJS from 'pdfjs-dist';
|
||||||
|
|
||||||
export async function getImagesOnPage(page: PDFPageProxy) {
|
export async function getImagesOnPage(page: PDFPageProxy) {
|
||||||
const ops = await page.getOperatorList();
|
const ops = await page.getOperatorList();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
import { PDFDocument } from 'pdf-lib';
|
import { PDFDocument } from 'pdf-lib';
|
||||||
import PDFJS from 'pdfjs-dist';
|
import * as PDFJS from 'pdfjs-dist';
|
||||||
import jsQR from "jsqr";
|
import jsQR from "jsqr";
|
||||||
|
|
||||||
import { detectEmptyPages } from "./common/detectEmptyPages.js";
|
import { detectEmptyPages } from "./common/detectEmptyPages.js";
|
||||||
|
Loading…
Reference in New Issue
Block a user