Skip to content

Commit b8fa7da

Browse files
committed
Simplify frontend
Just a login form and a list of applications. No modals or anything like that.
1 parent bf1be16 commit b8fa7da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+984
-1846
lines changed

.eslintrc.yaml

-16
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,16 @@ env:
88
parserOptions:
99
ecmaVersion: 2018
1010
sourceType: module
11-
ecmaFeatures:
12-
jsx: true
1311

1412
extends:
1513
- eslint:recommended
1614
- plugin:@typescript-eslint/recommended
1715
- plugin:import/recommended
1816
- plugin:import/typescript
19-
- plugin:react/recommended
2017
- plugin:prettier/recommended
2118
- prettier # Removes eslint rules that conflict with prettier.
2219
- prettier/@typescript-eslint # Remove conflicts again.
2320

24-
plugins:
25-
- react-hooks
26-
27-
# Need to set this explicitly for the eslint-plugin-react.
28-
settings:
29-
react:
30-
version: detect
31-
3221
rules:
3322
# For overloads.
3423
no-dupe-class-members: off
35-
36-
# https://www.npmjs.com/package/eslint-plugin-react-hooks
37-
react-hooks/rules-of-hooks: error
38-
39-
react/prop-types: off # We use Typescript to verify prop types.

package.json

-8
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@
2222
"devDependencies": {
2323
"@coder/nbin": "^1.2.7",
2424
"@types/fs-extra": "^8.0.1",
25-
"@types/hookrouter": "^2.2.1",
2625
"@types/mocha": "^5.2.7",
2726
"@types/node": "^12.12.7",
2827
"@types/parcel-bundler": "^1.12.1",
2928
"@types/pem": "^1.9.5",
30-
"@types/react": "^16.9.18",
31-
"@types/react-dom": "^16.9.5",
3229
"@types/safe-compare": "^1.1.0",
3330
"@types/tar-fs": "^1.16.1",
3431
"@types/tar-stream": "^1.6.1",
@@ -39,8 +36,6 @@
3936
"eslint-config-prettier": "^6.0.0",
4037
"eslint-plugin-import": "^2.18.2",
4138
"eslint-plugin-prettier": "^3.1.0",
42-
"eslint-plugin-react": "^7.14.3",
43-
"eslint-plugin-react-hooks": "^1.7.0",
4439
"leaked-handles": "^5.2.0",
4540
"mocha": "^6.2.0",
4641
"parcel-bundler": "^1.12.4",
@@ -58,11 +53,8 @@
5853
"dependencies": {
5954
"@coder/logger": "1.1.11",
6055
"fs-extra": "^8.1.0",
61-
"hookrouter": "^1.2.3",
6256
"httpolyglot": "^0.1.2",
6357
"pem": "^1.14.2",
64-
"react": "^16.12.0",
65-
"react-dom": "^16.12.0",
6658
"safe-compare": "^1.1.4",
6759
"tar-fs": "^2.0.0",
6860
"tar-stream": "^2.1.0",

scripts/build.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ class Builder {
247247

248248
if (process.env.MINIFY) {
249249
await this.task(`restricting ${name} to production dependencies`, async () => {
250-
return util.promisify(cp.exec)("yarn --production --ignore-scripts", { cwd: buildPath })
250+
await util.promisify(cp.exec)("yarn --production --ignore-scripts", { cwd: buildPath })
251+
if (name === "code-server") {
252+
await util.promisify(cp.exec)("yarn postinstall", { cwd: buildPath })
253+
}
251254
})
252255
}
253256
}
@@ -419,7 +422,7 @@ class Builder {
419422
}
420423

421424
private createBundler(out = "dist", commit?: string): Bundler {
422-
return new Bundler(path.join(this.rootPath, "src/browser/index.tsx"), {
425+
return new Bundler(path.join(this.rootPath, "src/browser/pages/app.ts"), {
423426
cache: true,
424427
cacheDir: path.join(this.rootPath, ".cache"),
425428
detailedReport: true,

scripts/code-server.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
# code-server.sh -- Run code-server with the bundled Node binary.
3+
4+
main() {
5+
cd "$(dirname "$0")" || exit 1
6+
./node ./out/node/entry.js "$@"
7+
}
8+
9+
main "$@"

src/browser/api.ts

-82
This file was deleted.

src/browser/app.tsx

-72
This file was deleted.

src/browser/components/animate.tsx

-31
This file was deleted.

src/browser/components/error.css

-28
This file was deleted.

src/browser/components/error.tsx

-49
This file was deleted.

0 commit comments

Comments
 (0)