Directly link to core

This commit is contained in:
Johannes Zillmann 2021-01-04 23:02:31 +01:00
parent ace930bd57
commit 989e14e295
6 changed files with 12 additions and 8 deletions

View File

@ -1,5 +1,5 @@
import Metadata from './Metadata';
import ParsedPage from './ParsedPage';
import type Metadata from './Metadata';
import type ParsedPage from './ParsedPage';
export default class ParseResult {
metadata: Metadata;

View File

@ -1,4 +1,4 @@
import ParsedPageItem from './ParsedPageItem';
import type ParsedPageItem from './ParsedPageItem';
export default class ParsedPage {
index: number;

View File

@ -2,7 +2,7 @@ import Metadata from './Metadata';
import ParsedPage from './ParsedPage';
import ParseResult from './ParseResult';
import TextDirection from './TextDirection';
import TextItem from './TextItem';
import type TextItem from './TextItem';
export default class PdfParser {
pdfjs: any;

View File

@ -3,6 +3,7 @@ module.exports = {
mount: {
public: { url: '/', static: true },
src: { url: '/dist' },
'../core/src': { url: '/core' },
},
plugins: [
['@snowpack/plugin-build-script', { cmd: 'postcss', input: ['.css'], output: ['.css'] }],
@ -28,6 +29,6 @@ module.exports = {
/* ... */
},
alias: {
/* ... */
'@core': '../core/src/index.js',
},
};

View File

@ -1,5 +1,5 @@
import { pdfParser } from 'pdf-to-markdown-core';
import type ParseResult from 'pdf-to-markdown-core/lib/src/ParseResult';
import { pdfParser } from '@core';
import type ParseResult from '@core/ParseResult';
import * as pdfjs from 'pdfjs-dist/es5/build/pdf';
import { Writable, writable } from 'svelte/store';

View File

@ -7,7 +7,10 @@
"jsx": "preserve",
"baseUrl": "./",
/* paths - If you configure Snowpack import aliases, add them here. */
"paths": {},
"paths": {
"@core": ["../core/src"],
"@core/*": ["../core/src/*"]
},
/* noEmit - Snowpack builds (emits) files, not tsc. */
"noEmit": true,
/* Additional Options */