changed site to docs for github pages

This commit is contained in:
bvn13 2023-04-30 00:58:10 +03:00
parent 974bd38c86
commit ba88baf058
15 changed files with 5 additions and 5 deletions

View File

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 146 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -37,7 +37,7 @@ def copyTask = tasks.register("copyPublic", Copy) {
dependsOn(yarn)
mustRunAfter(yarn)
from "public"
into "${buildDir}/../../site"
into "${buildDir}/../../docs"
println("copied")
}
@ -47,7 +47,7 @@ def rewriteContent = tasks.register("rewriteFileContent") {
inputs.dir("public")
doLast {
def publicPath = ""
def path = "${buildDir}/../../site"
def path = "${buildDir}/../../docs"
ant.replaceregexp(match: '%PUBLIC_URL%', replace: publicPath, flags: 'g', byline: true) {
fileset(dir: path, includes: 'index.html,manifest.json')
@ -59,14 +59,14 @@ def rewriteContent = tasks.register("rewriteFileContent") {
// https://www.metachris.com/2021/04/starting-a-typescript-project-in-2021/
def buildTask = tasks.register("buildWebapp", NpxTask) {
command = "esbuild"
args = ["src/index.tsx", "--bundle", "--sourcemap", "--outfile=${buildDir}/../../site/app/index.js"]
args = ["src/index.tsx", "--bundle", "--sourcemap", "--outfile=${buildDir}/../../docs/app/index.js"]
dependsOn(rewriteContent)
mustRunAfter(rewriteContent)
inputs.dir(fileTree("src").exclude("**/*.test.js").exclude("**/*.spec.js").exclude("**/__tests__/**/*.js"))
inputs.dir("node_modules")
inputs.dir("public")
outputs.dir("${buildDir}/../../site")
environment = ["BUILD_PATH": "${buildDir}/../../site"]
outputs.dir("${buildDir}/../../docs")
environment = ["BUILD_PATH": "${buildDir}/../../docs"]
println("built")
}