Compare commits

..

No commits in common. "6800f48f96c87d17e73843f29e2a4045d20978e3" and "b5a605bbd2853c8c3d15d1a9431b6359982c5b9c" have entirely different histories.

6 changed files with 21 additions and 63 deletions

32
Jenkinsfile vendored
View File

@ -1,32 +0,0 @@
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '4'))
timeout(time: 5, unit: 'MINUTES')
}
triggers {
pollSCM('*/10 * * * *')
}
stages {
stage('Build') {
steps {
withGradle {
echo 'Cleaning...'
sh './gradlew clean'
sh './gradlew kotlinUpgradeYarnLock'
echo 'Building..'
sh './gradlew browserProductionWebpack'
}
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
dir('compiledOutput') {
archiveArtifacts artifacts:'*.html, *.js, *.js.map', fingerprint: false
}
}
}
}
}

View File

@ -1,5 +1,5 @@
plugins {
id("org.jetbrains.kotlin.js") version "1.9.22"
id("org.jetbrains.kotlin.js") version "1.8.0"
}
group = "fr.username404"
@ -14,7 +14,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-html:${rootProject.property("kotlinx-html_version")}")
}
val compilationOutputDirectory = file("$rootDir/compiledOutput")
val outputDirectory = file("$rootDir/compiledOutput")
kotlin {
js(IR) {
@ -25,13 +25,7 @@ kotlin {
apiVersion = coreLibrariesVersion.run {
substring(0 until secondDot)
}
val majorVersion = apiVersion!!.substringBefore('.').toInt()
val minorVersion = apiVersion!!.substringAfter('.').toInt()
languageVersion = if (minorVersion == 9) {
"${majorVersion + 1}.0"
} else {
"$majorVersion.${minorVersion + 1}"
}
languageVersion = apiVersion!!.substringBefore('.') + '.' + (apiVersion!!.substringAfter('.').toInt() + 1).toString()
moduleKind = "plain"
freeCompilerArgs = freeCompilerArgs + listOf(
@ -42,31 +36,31 @@ kotlin {
}
}
browser {
webpackTask(Action {
outputDirectory = compilationOutputDirectory
webpackTask {
destinationDirectory = outputDirectory
output.library = "Web404"
output.libraryTarget = "this"
cssSupport { isEnabled = true }
})
}
runTask(Action {
runTask {
cssSupport { isEnabled = true }
})
}
testTask(Action {
testTask {
useKarma {
useFirefoxNightlyHeadless()
webpackConfig.cssSupport { isEnabled = true }
}
})
}
}
binaries.executable()
}
}
tasks {
clean.get().delete.add(compilationOutputDirectory)
clean.get().delete.add(outputDirectory)
withType(ProcessResources::class) {
destinationDir = compilationOutputDirectory
destinationDir = outputDirectory
}
}

View File

@ -4,8 +4,7 @@ org.gradle.jvmargs=-Xmx2G -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperiment
kotlin.incremental=true
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configuration-cache=on
org.gradle.unsafe.configuration-cache=on
org.gradle.vfs.watch=true
kotlin.experimental.tryK2=true
kotlinx-html_version=0.9.1+
kotlinx-html_version=0.8.0+

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-rc-1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-rc-2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -51,7 +51,7 @@ fun makeConsole() {
border-color: #2f5361;
outline: none !important;
background: #2f5361;
font-family: "Noto Sans Mono", monospace;
font-family: "Noto Sans Mono SemiBold", Noto, mono;
width: 25vw; height: 50vh;
resize: none;
}
@ -66,7 +66,7 @@ fun makeConsole() {
}
""".trimIndent()
) } }
script(src = "/ybcon.js") {}
script(src = "/ybcon.js") {} // Note: ybcon.js and ybcon.worker.js have to be available at this path on the server
textArea {
id = "input_box"
onKeyUpFunction = { event ->

View File

@ -3,13 +3,10 @@
<head>
<meta charset="UTF-8">
<meta property="og:title" content="Username404 - Webserver">
<meta property="og:description" content="This is the main page of Username404's web server.">
<meta property="og:description" content="This is the main page of Username404's apache server.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@600&family=Noto+Sans:wght@600&display=swap" rel="stylesheet">
<meta name="darkreader-lock">
<title>www.username404.fr</title>
<style>
html { scroll-behavior: smooth; }