refactor: split into src-web and src-tsp folders

This commit is contained in:
xyny 2024-05-13 20:15:03 +03:00
parent 1cb4b0ca4a
commit 2fa5fecc7c
6 changed files with 3 additions and 3 deletions

View file

@ -10,7 +10,7 @@ fs.existsSync(buildDir) && fs.rmSync(buildDir, { recursive: true });
fs.mkdirSync(buildDir)
fs.mkdirSync(`${buildDir}/modules`);
fs.copyFileSync('./_headers', `${buildDir}/_headers`);
fs.copyFileSync('./src-web/_headers', `${buildDir}/_headers`);
const ids = []
@ -26,7 +26,7 @@ fs.readdirSync(sourceDir).forEach((file) => {
console.log("Files built: " + ids.join(', '))
console.log("Generating index.html...")
const template = fs.readFileSync('./template-index.html').toString()
const template = fs.readFileSync('./src-web/template-index.html').toString()
const indexHtml = template.replace(
'%DYNAMIC_SCHEMA_LIST%',
ids.map(

View file

@ -8,7 +8,7 @@
},
"private": true,
"scripts": {
"build": "rm -rf ./tsp-output && npx tsp compile .",
"build": "rm -rf ./tsp-output && npx tsp compile ./src-tsp",
"build-web": "npm run build && node ./buildWeb.js"
}
}