Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
184 lines (184 loc) · 9.42 KB
/
Copy pathpackage.json
File metadata and controls
184 lines (184 loc) · 9.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
"name": "@liascript/exporter",
"version": "3.4.3--2.1.2",
"description": "A generic exporter for LiaScript",
"main": "dist/index.js",
"repository": {
"type": "git",
"url": "git://github.com/liascript/liascript-exporter.git"
},
"bugs": {
"url": "https://github.com/LiaScript/LiaScript-Exporter/issues",
"email": "LiaScript@web.de"
},
"homepage": "https://github.com/LiaScript/LiaScript-Exporter/README.md",
"bin": {
"liascript-exporter": "dist/index.js",
"liaex": "dist/index.js"
},
"preferGlobal": true,
"files": [
"dist/",
"README.md"
],
"scripts": {
"__postinstall": "npx puppeteer browsers install chrome",
"__preinstall": "cd LiaScript && npm i --allow-git=all && npm run build:scorm1.2 && cp -r dist ../assets/scorm1.2",
"build:assets": "npm run clean && npm run asset:scorm1.2 && npm run asset:scorm2004 && npm run asset:xapi && npm run asset:web && npm run asset:indexeddb && npm run asset:pdf && npm run asset:capacitor && npm run asset:logo && npm run fix:file",
"build:docker": "docker build -t liascript/exporter:latest .",
"webapp:assets": "node scripts/build-webapp-assets.js",
"webapp:html": "node scripts/build-webapp-html.js",
"webapp:pdf": "node scripts/copy-webapp-pdf.js",
"webapp:docx": "node scripts/copy-webapp-docx.js",
"webapp:dev": "rm -rf dist/webapp/dev && npm run webapp:assets && npm run webapp:html && npm run webapp:pdf dist/webapp/dev && npm run webapp:docx dist/webapp/dev && npx parcel serve --target webapp --dist-dir dist/webapp/dev --port 1234",
"webapp:build": "rm -rf dist/webapp/build && npm run webapp:assets && npm run webapp:html && npx parcel build --target webapp --dist-dir dist/webapp/build --public-url ./ && npm run webapp:pdf dist/webapp/build && npm run webapp:docx dist/webapp/build",
"clean": "rm -rf dist/assets/*",
"asset:logo": "cp -r LiaScript/resources dist",
"asset:web": "cd LiaScript && npm i --allow-git=all && npm run build:base && cp -r dist ../dist/assets/web",
"asset:pdf": "cd LiaScript && npm i --allow-git=all && git checkout -- package-lock.json && git checkout feat/fullPage && rm -rf node_modules .parcel-cache elm-stuff && npm i --allow-git=all && npm run build:pdf && cp -r dist ../dist/assets/pdf && git checkout -- package-lock.json && git checkout development && rm -rf node_modules && npm i --allow-git=all",
"asset:scorm1.2": "cd LiaScript && npm i --allow-git=all && npm run build:scorm1.2 && cp -r dist ../dist/assets/scorm1.2",
"asset:scorm2004": "cd LiaScript && npm i --allow-git=all && npm run build:scorm2004 && cp -r dist ../dist/assets/scorm2004",
"asset:indexeddb": "cd LiaScript && npm i --allow-git=all && npm run build:indexeddb && cp -r dist ../dist/assets/indexeddb",
"asset:xapi": "cd LiaScript && npm i --allow-git=all && npm run build:xapi && cp -r dist ../dist/assets/xapi",
"asset:capacitor": "cd LiaScript && npm i --allow-git=all && git checkout -- package-lock.json && git checkout feat/capacitor8 && rm -rf node_modules .parcel-cache elm-stuff && npm i --allow-git=all && npm run build:indexeddb && cp -r dist ../dist/assets/capacitor && git checkout -- package-lock.json && git checkout development && rm -rf node_modules && npm i --allow-git=all",
"asset:deduplicate": "./scripts/deduplicate-assets.sh",
"build": "npx parcel build --no-cache --no-source-maps src/index.ts && npm run shebang && npm run copy:public && npm run copy:presets",
"build:all": "npm run clean && npm run build:assets && npm run asset:deduplicate && cp -r dist/assets/common/* dist/assets/pdf && npm run build && npm run minify",
"build:debug": "npx parcel build --target node --no-minify --log-level 5 src/index.ts",
"watch": "npx parcel serve --no-cache --no-source-maps src/index.ts --out-dir dist --out-file index.js",
"copy:public": "node scripts/copy-files.js",
"copy:presets": "node scripts/copy-files.js presets",
"run:moodle": "cd docker/moodle && docker-compose up",
"run:ilias": "cd docker/ilias && docker-compose up",
"fix:file": "find dist/ -type f -name \"*.js\" -exec sed -i -r 's/\\/\\(https\\?\\|file\\|ftp\\|\\(chrome\\|moz\\|safari-web\\)-extension\\):\\\\\\/\\\\\\/\\[/\\/(https?|file|ftp|(chrome|moz|safari-web)-extension):\\\\\\/\\\\\\/\\\\\\/?[/g' {} +",
"shebang": "node scripts/add-shebang.js",
"minify": "echo ''; printf '%-60s %12s %12s %12s %10s\\n' 'File' 'Before' 'After' 'Reduced' 'Savings'; printf '%-60s %12s %12s %12s %10s\\n' '----' '------' '-----' '-------' '-------'; find dist -name \"*.js\" -print0 | xargs -0 -P 4 -I {} sh -c 'before=$(wc -c < {}); minify {} > {}.min && after=$(wc -c < {}.min); if [ ${after} -lt ${before} ]; then mv {}.min {}; reduction=$((${before}-${after})); percent=$(awk \"BEGIN {printf \\\"%.1f\\\", ${reduction}/${before}*100}\"); printf \"%-60s %12s %12s %12s %9s%%\\n\" \"{}\" \"${before}\" \"${after}\" \"${reduction}\" \"${percent}\"; else rm {}.min; printf \"%-60s %12s %12s %12s %10s\\n\" \"{}\" \"${before}\" \"${after}\" \"-\" \"0.0%\"; fi'",
"electron:dev": "NODE_ENV=development electron electron/main.js",
"electron:build": "npm run build && electron-builder --config electron-builder.json",
"electron:build:quick": "npm run build && electron-builder --linux AppImage --x64 --config electron-builder.json",
"electron:build:win": "npm run build && electron-builder --win --config electron-builder.json",
"electron:build:mac": "npm run build && electron-builder --mac --config electron-builder.json",
"electron:build:linux": "npm run build && electron-builder --linux --config electron-builder.json",
"electron:build:all": "npm run build && electron-builder --win --mac --linux --config electron-builder.json",
"electron:pack": "npm run build && electron-builder --dir --config electron-builder.json",
"test:unit": "vitest run",
"test:setup": "tsx tests/scripts/setup.ts",
"test:check": "tsx tests/scripts/check-output.ts",
"test:types": "tsc -p tests/tsconfig.json",
"test:cli": "playwright test --project=cli",
"test:cli:deep": "DEEP=1 playwright test --project=cli",
"test:server": "playwright test --project=server",
"test:webapp": "playwright test --project=webapp",
"test:webapp:deep": "DEEP=1 playwright test --project=webapp",
"test:desktop": "playwright test --project=desktop",
"test:webapp:browsers": "playwright test --project=webapp-firefox --project=webapp-webkit",
"test:build": "npm run build && npm run webapp:build",
"test:all": "npm run test:build && npm run test:types && npm run test:unit && playwright test --project=cli --project=server --project=webapp",
"test:all:deep": "npm run test:setup && npm run test:build && npm run test:types && npm run test:unit && DEEP=1 playwright test --project=cli --project=server --project=webapp"
},
"keywords": [
"LiaScript",
"SCORM",
"OER",
"Markdown",
"OER"
],
"author": "André Dietrich <Andre.Dietrich@informatik.tu-freiberg.de>",
"license": "ISC",
"dependencies": {
"@fastify/cors": "^9.0.1",
"@fastify/multipart": "^8.1.0",
"@fastify/static": "^7.0.1",
"@lesjoursfr/html-to-epub": "^6.0.1",
"@liascript/simple-scorm-packager": "^0.3.2",
"@turbodocx/html-to-docx": "^1.20.1",
"archiver": "^7.0.1",
"electron-updater": "^6.8.9",
"epub-gen": "^0.1.0",
"fastify": "^4.26.0",
"fflate": "^0.8.3",
"fs-extra": "^11.3.3",
"html2canvas": "^1.4.1",
"isomorphic-git": "^1.38.4",
"jsonld": "^9.0.0",
"minify":"9.2.0",
"minimist": "^1.2.5",
"node-fetch": "^2.7.0",
"open": "^8.4.2",
"path": "^0.12.7",
"pino-pretty": "^13.0.0",
"puppeteer": "^24.34.0",
"simply-beautiful": "^1.0.1",
"temp": "^0.9.4",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
"unzipper": "^0.12.3",
"xhr2": "^0.2.1",
"yaml": "^2.8.2"
},
"devDependencies": {
"@parcel/transformer-elm": "^2.16.3",
"@parcel/transformer-inline-string": "^2.16.3",
"@parcel/transformer-yaml": "^2.16.3",
"@playwright/test": "^1.63.0",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.19.27",
"@types/temp": "^0.9.1",
"@types/unzipper": "^0.10.11",
"@xmldom/xmldom": "^0.9.12",
"assert": "^2.1.0",
"browserify-zlib": "^0.2.0",
"constants-browserify": "^1.0.0",
"crypto-browserify": "^3.12.1",
"electron": "^30.5.1",
"electron-builder": "^24.9.1",
"elm": "^0.19.1-6",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"parcel": "^2.16.3",
"path-browserify": "^1.0.1",
"pdfjs-dist": "^6.3.289",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"tsx": "^4.23.15",
"url": "^0.11.4",
"util": "^0.12.5",
"vitest": "^3.2.7",
"vm-browserify": "^1.1.2"
},
"puppeteer": {
"chrome-headless-shell": {
"skipDownload": true
}
},
"engines": {
"node": ">= 12"
},
"targets": {
"main": {
"context": "node",
"optimize": true
},
"webapp": {
"source": [
"src/webapp/generated/index.html",
"src/webapp/generated/status.html"
],
"context": "browser"
}
},
"allowScripts": {
"spawn-sync@1.0.15": true,
"puppeteer@24.34.0": true,
"msgpackr-extract@3.0.3": true,
"elm@0.19.1-6": true,
"@parcel/watcher@2.5.1": true,
"@swc/core@1.15.7": true,
"@turbodocx/html-to-docx@1.20.1": true,
"lmdb@2.8.5": true,
"itwcw-package-analytics@1.0.6": true,
"ejs@2.7.4": true,
"electron@30.5.1": true,
"esbuild@0.28.2": true
}
}