Skip to content

Commit

Permalink
Remove the legacy webapp (#1045)
Browse files Browse the repository at this point in the history
Motivation:

The new UI becomes stablized and we don't get addtional bug reports for
them. So I think it is safe to remove the legacy webapp to improve build
speed and reduce the artifact size.

Modifications:

- Remove `server/src/main/resource` folder
- Remove build scripts for the legacy webapp in `build.gradle`
- Remove `/legacy-webapp` route path from the server.

Result:

The legacy webapp is no longer supported.
  • Loading branch information
ikhoon authored Nov 1, 2024
1 parent 50db64f commit 56d1f0a
Show file tree
Hide file tree
Showing 82 changed files with 0 additions and 7,191 deletions.
59 changes: 0 additions & 59 deletions server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
plugins {
alias libs.plugins.node.gradle
}

node {
version = '22.3.0'
npmVersion = '10.8.1'
download = true
npmInstallCommand = "ci"
}

dependencies {
implementation project(':common-legacy')

Expand Down Expand Up @@ -73,52 +62,4 @@ if (!rootProject.hasProperty('noWeb')) {
}
}

def clientRelocations = [
'ace-builds/src-min-noconflict/',
'angular/angular.min.js',
'angular-cache-buster/angular-cache-buster.js',
'angular-cookies/angular-cookies.min.js',
'angular-dynamic-locale/dist/tmhDynamicLocale.min.js',
'angular-ui-ace/src/ui-ace.js',
'angular-i18n',
'angular-local-storage/dist/angular-local-storage.min.js',
'angular-resource/angular-resource.min.js',
'angular-sanitize/angular-sanitize.min.js',
'angular-translate/dist/angular-translate.min.js',
'angular-translate-loader-partial/angular-translate-loader-partial.min.js',
'angular-translate-storage-cookie/angular-translate-storage-cookie.min.js',
'angular-ui-ace/src/ui-ace.js',
'angular-ui-bootstrap/dist/',
'angular-ui-notification/dist/',
'angular-ui-router/release/angular-ui-router.min.js',
'bootstrap/dist/',
'bootswatch/cerulean/bootstrap.min.css',
'diff/dist/diff.min.js',
'fast-json-patch/dist/json-patch-duplex.min.js',
'jquery/dist/jquery.min.js',
'json3/lib/json3.min.js',
'moment/min/moment.min.js'
]

task copyClientDependencies {
dependsOn tasks.npmInstall

doLast {
clientRelocations.each { location ->
def paths = location.split('/')
def folder = paths[0]
copy {
from "${project.projectDir}/node_modules/$location"
into "${project.projectDir}/src/main/resources/webapp/vendor/$folder"
}
}
}
}

task cleanClientDependencies(type: Delete) {
delete "${project.projectDir}/src/main/resources/webapp/vendor"
}

tasks.sourcesJar.dependsOn(tasks.versionProperties)
tasks.clean.dependsOn(tasks.cleanClientDependencies)
tasks.processResources.dependsOn(tasks.copyClientDependencies)
319 changes: 0 additions & 319 deletions server/package-lock.json

This file was deleted.

30 changes: 0 additions & 30 deletions server/package.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -900,13 +900,6 @@ protected HttpResponse doGet(ServiceRequestContext ctx, HttpRequest req) {
.serveCompressedFiles(true)
.fallbackFileExtensions("html")
.build());

sb.serviceUnder("/legacy-web",
FileService.builder(CentralDogma.class.getClassLoader(), "webapp")
.cacheControl(ServerCacheControl.REVALIDATED)
.autoDecompress(true)
.serveCompressedFiles(true)
.build());
}

sb.errorHandler(new HttpApiExceptionHandler());
Expand Down
Loading

0 comments on commit 56d1f0a

Please sign in to comment.