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