diff --git a/.eslintrc.yaml b/.eslintrc.yaml index a06f1d76..bb76a91a 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -23,6 +23,9 @@ rules: no-dupe-class-members: off "@typescript-eslint/no-use-before-define": off "@typescript-eslint/no-non-null-assertion": off + eqeqeq: error + import/order: + [error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }] settings: # Does not work with CommonJS unfortunately. diff --git a/ci/build/build-code-server.sh b/ci/build/build-code-server.sh index f0e4ddc3..df085280 100755 --- a/ci/build/build-code-server.sh +++ b/ci/build/build-code-server.sh @@ -9,7 +9,8 @@ MINIFY=${MINIFY-true} main() { cd "$(dirname "${0}")/../.." - tsc --outDir out --tsBuildInfoFile .cache/out.tsbuildinfo + tsc + # If out/node/entry.js does not already have the shebang, # we make sure to add it and make it executable. if ! grep -q -m1 "^#!/usr/bin/env node" out/node/entry.js; then @@ -22,7 +23,9 @@ main() { --out-dir dist \ $([[ $MINIFY ]] || echo --no-minify) \ src/browser/register.ts \ - src/browser/serviceWorker.ts + src/browser/serviceWorker.ts \ + src/browser/pages/login.ts \ + src/browser/pages/vscode.ts } main "$@" diff --git a/ci/dev/watch.ts b/ci/dev/watch.ts index ba386b75..73823d03 100644 --- a/ci/dev/watch.ts +++ b/ci/dev/watch.ts @@ -164,7 +164,12 @@ class Watcher { private createBundler(out = "dist"): Bundler { return new Bundler( - [path.join(this.rootPath, "src/browser/register.ts"), path.join(this.rootPath, "src/browser/serviceWorker.ts")], + [ + path.join(this.rootPath, "src/browser/register.ts"), + path.join(this.rootPath, "src/browser/serviceWorker.ts"), + path.join(this.rootPath, "src/browser/pages/login.ts"), + path.join(this.rootPath, "src/browser/pages/vscode.ts"), + ], { outDir: path.join(this.rootPath, out), cacheDir: path.join(this.rootPath, ".cache"), diff --git a/src/browser/pages/login.html b/src/browser/pages/login.html index 586c9c66..f2b26299 100644 --- a/src/browser/pages/login.html +++ b/src/browser/pages/login.html @@ -47,10 +47,5 @@ - + diff --git a/src/browser/pages/login.ts b/src/browser/pages/login.ts new file mode 100644 index 00000000..c7fc92d4 --- /dev/null +++ b/src/browser/pages/login.ts @@ -0,0 +1,7 @@ +import { getOptions } from "../../common/util" + +const options = getOptions() +const el = document.getElementById("base") as HTMLInputElement +if (el) { + el.value = options.base +} diff --git a/src/browser/pages/vscode.html b/src/browser/pages/vscode.html index 4653698b..e846ec0d 100644 --- a/src/browser/pages/vscode.html +++ b/src/browser/pages/vscode.html @@ -43,47 +43,7 @@ - +