ci: update build config and scripts

This commit is contained in:
Derrick Hammer 2023-07-21 07:47:50 -04:00
parent 4403ef8151
commit b6b273ff0f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 33 additions and 2 deletions

25
.presetterrc.json Normal file
View File

@ -0,0 +1,25 @@
{
"preset": [
"@lumeweb/presetter-kernel-module-preset"
],
"config": {
"browser": true,
"vite": {
"build": {
"copyPublicDir": false,
"lib": {
"entry": "{source}/tester.js",
"fileName": "tester",
"formats": {
"0": "umd"
}
}
}
}
},
"scripts": {
"build:vite": "vite build",
"build:bin": "shx mv lib/tester.umd.cjs public/tester.js && shx mkdir -p bin && shx mv build/sandbox* bin/",
"build:lib": "shx mv build/* lib/ && shx rm lib/tester*"
}
}

View File

@ -3,8 +3,7 @@
"version": "0.1.0",
"scripts": {
"prepare": "presetter bootstrap",
"build": "run build build:bin",
"build:bin": "mv build/tester* public && mkdir -p bin && mv build/sandbox* bin/"
"build": "run build build:bin build:lib"
},
"main": "dist/index.js",
"type": "module",
@ -22,5 +21,12 @@
"@lumeweb/libkernel": "^0.1.0-develop.21",
"puppeteer": "^20.7.4",
"static-server": "^2.2.1"
},
"files": [
"public",
"lib"
],
"publishConfig": {
"access": "public"
}
}