Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
693 changes: 0 additions & 693 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions packages/extension-tei/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
"type": "module",
"scripts": {
"start": "vite --host",
"build": "vite build",
"build": "tsc -p tsconfig.build.json && vite build",
"preview": "vite preview",
"test": "echo 'Skipping tests in @recogito/text-annotator package'"
},
"main": "./dist/text-annotator-tei.umd.js",
"module": "./dist/text-annotator-tei.es.js",
"types": "./dist/src/index.d.ts",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/text-annotator-tei.es.js",
"require": "./dist/text-annotator-tei.umd.js"
},
Expand All @@ -28,11 +28,10 @@
"devDependencies": {
"CETEIcean": "^1.9.5",
"typescript": "5.9.3",
"vite": "^6.3.6",
"vite-plugin-dts": "^4.5.4"
"vite": "^6.3.6"
},
"peerDependencies": {
"@annotorious/core": "^3.7.11",
"@recogito/text-annotator": "3.3.3"
}
}
}
14 changes: 14 additions & 0 deletions packages/extension-tei/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
/* Declarations */
"noEmit": false,
"declaration": true,
"emitDeclarationOnly": true,
"rootDir": "src",
"outDir": "dist"
},
"include": [
"src"
]
}
46 changes: 34 additions & 12 deletions packages/extension-tei/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "ESNext",
"lib": [
"DOM",
"ESNext"
],
/*
`bundler` allows resolving the new `exports`/`imports` syntax in the `package.json`
But it doesn't enforce specifying files extensions for imports.
@see https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution-is-host-defined
*/
"module": "ESNext",
"moduleResolution": "bundler",
/* Linting */
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"incremental": false,
"isolatedModules": true,
"module": "ESNext",
"moduleResolution": "bundler",
"outDir": "dist",
"resolveJsonModule": true,
"skipLibCheck": false,
"sourceMap": true,
"target": "ESNext",
"verbatimModuleSyntax": true
"skipLibCheck": true,
"verbatimModuleSyntax": true,
/* Declarations */
"noEmit": true,
/* Aliases */
"baseUrl": "."
},
"include": ["./src/**/*", "./test/**/*"],
"exclude": ["node_modules", "dist"]
}
"include": [
"src",
"test"
],
"exclude": [
"node_modules",
"dist"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
20 changes: 20 additions & 0 deletions packages/extension-tei/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"composite": true,
/*
`bundler` allows resolving the new `exports`/`imports` syntax in the `package.json`
But it doesn't enforce specifying files extensions for imports.
@see https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution-is-host-defined
*/
"module": "ESNext",
"moduleResolution": "bundler",
"noEmit": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true
},
"include": [
"vite.config.ts",
"package.json"
]
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';

export default defineConfig({
plugins: [
dts({
insertTypesEntry: true,
entryRoot: '.'
})
],
server: {
open: '/test/index.html'
},
build: {
emptyOutDir: false,
sourcemap: true,
lib: {
entry: './src/index.ts',
Expand All @@ -25,4 +19,4 @@ export default defineConfig({
}
}
}
});
});
5 changes: 2 additions & 3 deletions packages/text-annotator-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"start": "vite --host",
"build": "tsc && vite build",
"build": "tsc -p tsconfig.build.json && vite build",
"preview": "vite preview",
"test": "echo 'Skipping tests in @recogito/text-annotator-react package'"
},
Expand All @@ -31,8 +31,7 @@
"react-dom": "^19.2.0",
"typescript": "5.9.3",
"vite": "^6.3.6",
"vite-plugin-dts": "^4.5.4",
"vite-plugin-externalize-deps": "^0.10.0",
"vite-plugin-externalize-deps": "^0.9.0",
"vite-tsconfig-paths": "^5.1.4"
},
"peerDependencies": {
Expand Down
14 changes: 14 additions & 0 deletions packages/text-annotator-react/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
/* Declarations */
"noEmit": false,
"declaration": true,
"emitDeclarationOnly": true,
"rootDir": "src",
"outDir": "dist"
},
"include": [
"src"
]
}
56 changes: 37 additions & 19 deletions packages/text-annotator-react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,48 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": [
"DOM",
"ESNext"
],
/*
`bundler` allows resolving the new `exports`/`imports` syntax in the `package.json`
But it doesn't enforce specifying files extensions for imports.
@see https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution-is-host-defined
*/
"module": "ESNext",
"moduleResolution": "bundler",
/* Linting */
"allowJs": false,
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"declaration": true,
"declarationDir": "dist",
"declarationMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"useDefineForClassFields": true,
/* React */
"jsx": "react-jsx",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"module": "ESNext",
"moduleResolution": "bundler",
/* Declarations, the `dts` plugin is used */
"noEmit": true,
"outDir": "dist",
/* Aliases */
"baseUrl": ".",
"paths": {
"@recogito/react": ["src/index.ts"]
},
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"target": "ESNext",
"useDefineForClassFields": true
"@recogito/react": [
"src/index.ts"
]
}
},
"include": ["src"],
"exclude": ["node_modules", "dist"],
"references": [{ "path": "./tsconfig.node.json" }],
}
"include": [
"src"
],
"exclude": [
"node_modules",
"dist"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
18 changes: 14 additions & 4 deletions packages/text-annotator-react/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"composite": true,
/*
`bundler` allows resolving the new `exports`/`imports` syntax in the `package.json`
But it doesn't enforce specifying files extensions for imports.
@see https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution-is-host-defined
*/
"module": "ESNext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"noEmit": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true
},
"include": ["vite.config.ts", "package.json"]
}
"include": [
"vite.config.ts",
"package.json"
]
}
6 changes: 1 addition & 5 deletions packages/text-annotator-react/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tsConfigPaths from 'vite-tsconfig-paths';
import dts from 'vite-plugin-dts';
import { externalizeDeps } from 'vite-plugin-externalize-deps';

export default defineConfig({
plugins: [
react(),
tsConfigPaths(),
dts({
include: ['./src/'],
entryRoot: './src'
}),
externalizeDeps(),
],
server: {
open: '/test/index.html'
},
build: {
emptyOutDir: false,
lib: {
entry: './src/index.ts',
name: 'ReactTextAnnotator',
Expand Down
7 changes: 3 additions & 4 deletions packages/text-annotator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"start": "vite --host",
"build": "vite build && vite build --config vite.config.umd.ts",
"build": "tsc -p tsconfig.build.json && vite build && vite build --config vite.config.umd.ts",
"preview": "vite preview",
"test": "vitest"
},
Expand All @@ -19,7 +19,7 @@
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/text-annotator.es.js",
"require": "./dist/text-annotator.umd.js"
},
Expand All @@ -31,8 +31,7 @@
"jsdom": "^27.0.0",
"typescript": "5.9.3",
"vite": "^6.3.6",
"vite-plugin-dts": "^4.5.4",
"vite-plugin-externalize-deps": "^0.10.0",
"vite-plugin-externalize-deps": "^0.9.0",
"vitest": "^3.2.4"
},
"dependencies": {
Expand Down
14 changes: 14 additions & 0 deletions packages/text-annotator/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
/* Declarations */
"noEmit": false,
"declaration": true,
"emitDeclarationOnly": true,
"rootDir": "src",
"outDir": "dist"
},
"include": [
"src"
]
}
Loading