Compare commits

...

10 Commits

Author SHA1 Message Date
Username404-59 6800f48f96
Remove a comment about ybcon.js and ybcon.worker.js (the latter isn't even needed anymore as of emscripten 3.1.58)
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
2024-05-10 03:48:27 +02:00
Username404-59 d691fda07f
Update gradle to 6.8-rc-1
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
2024-05-10 03:47:55 +02:00
Username404 a4dda7b594
Add a google fonts link for Noto Sans Mono
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2024-01-01 20:19:33 +01:00
Username404 2e086e6b92
Update dependencies
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2024-01-01 19:32:47 +01:00
Username404 d3bd144bfa
Update the description meta
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2024-01-01 19:00:22 +01:00
Username404 f4bba37968
Disable Dark Reader
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2024-01-01 18:59:00 +01:00
Username404 e65f3dbadf
Update dependencies 2023-08-10 18:38:55 +02:00
Username404 1c8d5bc28e
Update gradle to the 8.1-rc-3 version
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2023-04-09 11:17:58 +02:00
Username404 eddb256009
Add a Jenkinsfile
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2023-04-09 11:13:20 +02:00
Username404 9789e81ec1
Update kotlin to the 1.8.20 version
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2023-04-08 23:17:24 +02:00
6 changed files with 62 additions and 20 deletions

32
Jenkinsfile vendored Normal file
View File

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

View File

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

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-rc-2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-rc-1-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 SemiBold", Noto, mono;
font-family: "Noto Sans Mono", monospace;
width: 25vw; height: 50vh;
resize: none;
}
@ -66,7 +66,7 @@ fun makeConsole() {
}
""".trimIndent()
) } }
script(src = "/ybcon.js") {} // Note: ybcon.js and ybcon.worker.js have to be available at this path on the server
script(src = "/ybcon.js") {}
textArea {
id = "input_box"
onKeyUpFunction = { event ->

View File

@ -3,10 +3,13 @@
<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 apache server.">
<meta property="og:description" content="This is the main page of Username404's web server.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<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; }