Compare commits
10 Commits
b5a605bbd2
...
6800f48f96
Author | SHA1 | Date |
---|---|---|
Username404-59 | 6800f48f96 | |
Username404-59 | d691fda07f | |
Username404 | a4dda7b594 | |
Username404 | 2e086e6b92 | |
Username404 | d3bd144bfa | |
Username404 | f4bba37968 | |
Username404 | e65f3dbadf | |
Username404 | 1c8d5bc28e | |
Username404 | eddb256009 | |
Username404 | 9789e81ec1 |
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("org.jetbrains.kotlin.js") version "1.8.0"
|
id("org.jetbrains.kotlin.js") version "1.9.22"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "fr.username404"
|
group = "fr.username404"
|
||||||
|
@ -14,7 +14,7 @@ dependencies {
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-html:${rootProject.property("kotlinx-html_version")}")
|
implementation("org.jetbrains.kotlinx:kotlinx-html:${rootProject.property("kotlinx-html_version")}")
|
||||||
}
|
}
|
||||||
|
|
||||||
val outputDirectory = file("$rootDir/compiledOutput")
|
val compilationOutputDirectory = file("$rootDir/compiledOutput")
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
js(IR) {
|
js(IR) {
|
||||||
|
@ -25,7 +25,13 @@ kotlin {
|
||||||
apiVersion = coreLibrariesVersion.run {
|
apiVersion = coreLibrariesVersion.run {
|
||||||
substring(0 until secondDot)
|
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"
|
moduleKind = "plain"
|
||||||
freeCompilerArgs = freeCompilerArgs + listOf(
|
freeCompilerArgs = freeCompilerArgs + listOf(
|
||||||
|
@ -36,31 +42,31 @@ kotlin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
browser {
|
browser {
|
||||||
webpackTask {
|
webpackTask(Action {
|
||||||
destinationDirectory = outputDirectory
|
outputDirectory = compilationOutputDirectory
|
||||||
output.library = "Web404"
|
output.library = "Web404"
|
||||||
output.libraryTarget = "this"
|
output.libraryTarget = "this"
|
||||||
cssSupport { isEnabled = true }
|
cssSupport { isEnabled = true }
|
||||||
}
|
})
|
||||||
|
|
||||||
runTask {
|
runTask(Action {
|
||||||
cssSupport { isEnabled = true }
|
cssSupport { isEnabled = true }
|
||||||
}
|
})
|
||||||
|
|
||||||
testTask {
|
testTask(Action {
|
||||||
useKarma {
|
useKarma {
|
||||||
useFirefoxNightlyHeadless()
|
useFirefoxNightlyHeadless()
|
||||||
webpackConfig.cssSupport { isEnabled = true }
|
webpackConfig.cssSupport { isEnabled = true }
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
binaries.executable()
|
binaries.executable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
clean.get().delete.add(outputDirectory)
|
clean.get().delete.add(compilationOutputDirectory)
|
||||||
withType(ProcessResources::class) {
|
withType(ProcessResources::class) {
|
||||||
destinationDir = outputDirectory
|
destinationDir = compilationOutputDirectory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,8 @@ org.gradle.jvmargs=-Xmx2G -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperiment
|
||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.unsafe.configuration-cache=on
|
org.gradle.configuration-cache=on
|
||||||
org.gradle.vfs.watch=true
|
org.gradle.vfs.watch=true
|
||||||
|
kotlin.experimental.tryK2=true
|
||||||
|
|
||||||
kotlinx-html_version=0.8.0+
|
kotlinx-html_version=0.9.1+
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -51,7 +51,7 @@ fun makeConsole() {
|
||||||
border-color: #2f5361;
|
border-color: #2f5361;
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
background: #2f5361;
|
background: #2f5361;
|
||||||
font-family: "Noto Sans Mono SemiBold", Noto, mono;
|
font-family: "Noto Sans Mono", monospace;
|
||||||
width: 25vw; height: 50vh;
|
width: 25vw; height: 50vh;
|
||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ fun makeConsole() {
|
||||||
}
|
}
|
||||||
""".trimIndent()
|
""".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 {
|
textArea {
|
||||||
id = "input_box"
|
id = "input_box"
|
||||||
onKeyUpFunction = { event ->
|
onKeyUpFunction = { event ->
|
||||||
|
|
|
@ -3,10 +3,13 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta property="og:title" content="Username404 - Webserver">
|
<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">
|
<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&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>
|
<title>www.username404.fr</title>
|
||||||
<style>
|
<style>
|
||||||
html { scroll-behavior: smooth; }
|
html { scroll-behavior: smooth; }
|
||||||
|
|
Loading…
Reference in New Issue