add packaging scripts

This commit is contained in:
Valentin Boettcher 2020-04-09 16:06:17 +02:00
parent b25e3c13d0
commit 478154405c
2 changed files with 32 additions and 0 deletions

23
package.json Normal file
View file

@ -0,0 +1,23 @@
{
"name": "riot-katex-tu-dd",
"version": "1.0.0",
"description": "Renders formulars on matrix.tu-dresden.de chats using KaTeX",
"main": "riot-katex.js",
"dependencies": {
"katex": "^0.11.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vale981/riot-katex.git"
},
"author": "",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/vale981/riot-katex/issues"
},
"homepage": "https://github.com/vale981/riot-katex#readme"
}

9
package.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
npm install
mkdir katex-riot-pub
cp manifest.json riot-katex.js node_modules/katex/dist/katex.min.js node_modules/katex/dist/contrib/auto-render.min.js node_modules/katex/dist/katex.min.css katex-riot-pub
mkdir katex-riot-pub/fonts
cp -r node_modules/katex/dist/fonts/*.woff2 katex-riot-pub/fonts/
zip -r -FS katex-riot.zip katex-riot-pub/*