Skip to content
Open
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
628 changes: 627 additions & 1 deletion package-lock.json

Large diffs are not rendered by default.

29 changes: 23 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "CETEIcean",
"version": "1.9.5",
"description": "JavaScript library to load a TEI XML document and register it as HTML5 custom elements.",
"main": "src/CETEI.js",
"main": "dist/CETEI.js",
"type": "module",
"keywords": [
"TEI",
Expand All @@ -16,25 +16,42 @@
"type": "git",
"url": "https://github.com/TEIC/CETEIcean.git"
},
"types": "dist/types/CETEI.d.ts",
"exports": {
".": "./src/CETEI.js",
"./utilities.js": "./src/utilities.js"
".": {
"types": "./dist/types/CETEI.d.ts",
"default": "./dist/CETEI.js"
},
"./utilities.js": {
"types": "./dist/types/utilities.d.ts",
"default": "./dist/ts/utilities.js"
}
},
"devDependencies": {
"@babel/core": "^7.26.9",
"@babel/preset-env": "^7.26.9",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.3.0",
"@types/jsdom": "^27.0.0",
"@types/node": "^24.10.1",
"http-server": "^14.1.1",
"jsdom": "^26.0.0",
"onchange": "^7.1.0",
"playwright": "^1.57.0",
"rollup": "^4.34.8",
"terser": "^5.39.0"
"terser": "^5.39.0",
"tsx": "^4.19.2",
"typescript": "^5.9.3"
},
"scripts": {
"build": "npm test && rollup -c rollup.config.js",
"build:tutorial": "npm run build && cp dist/CETEI.js tutorial/js/CETEI.js",
"build:tutorial": "npm run build && cp dist/CETEI.js tutorial_en/js/CETEI.js && cp dist/CETEI.js tutorial_es/js/CETEI.js && cp dist/CETEI.js tutorial_ja/js/CETEI.js",
"dev": "npm run build && http-server -p 8888 & onchange src -- npm run build",
"test": "node test/nodeTest.js"
"test": "tsx test/nodeTest.js",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"tslib": "^2.8.1"
}
}
20 changes: 19 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
import babel from "@rollup/plugin-babel";
import terser from "@rollup/plugin-terser";
import typescript from "@rollup/plugin-typescript";

export default {
input: "src/CETEI.js",
input: "src/CETEI.ts",
output: {
file: "dist/CETEI.js",
format: "iife",
name: "CETEI",
sourcemap: false,
},
plugins: [
typescript({
include: ["src/**/*.ts"],
tsconfig: false,
compilerOptions: {
target: "ES2019",
module: "ESNext",
moduleResolution: "Node",
lib: ["DOM", "DOM.Iterable", "ES2019"],
allowJs: false,
checkJs: false,
strict: false,
skipLibCheck: true,
esModuleInterop: true,
forceConsistentCasingInFileNames: true,
sourceMap: false
}
}),
babel({exclude: "node_modules/**",
"babelHelpers": "bundled",
"presets": [
Expand Down
Loading