Skip to content

Commit 3ead332

Browse files
committed
refactor: Move package.json and other front-end collateral into site/
1 parent 38867b0 commit 3ead332

File tree

18 files changed

+147
-120
lines changed

18 files changed

+147
-120
lines changed

.github/workflows/coder.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,18 @@ jobs:
194194
node-version: "14"
195195

196196
- run: yarn install
197+
working-directory: site
197198

198199
- run: yarn build
200+
working-directory: site
199201

200202
- run: yarn test:coverage
203+
working-directory: site
201204

202205
- uses: codecov/codecov-action@v2
203206
if: github.actor != 'dependabot[bot]'
204207
with:
205208
token: ${{ secrets.CODECOV_TOKEN }}
206-
files: ./coverage/lcov.info
209+
files: ./site/coverage/lcov.info
207210
flags: unittest-js
208211
fail_ci_if_error: true

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ yarn-error.log
1616

1717
# Front-end ignore
1818
.next/
19+
site/.eslintcache
1920
site/.next/
21+
site/node_modules/
22+
site/yarn-error.log
2023
coverage/
2124

2225
# Build
2326
bin/
24-
site/out/
27+
site/out/

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ provisionersdk/proto: provisionersdk/proto/provisioner.proto
7474
.PHONY: provisionersdk/proto
7575

7676
site/out:
77-
yarn build
78-
yarn export
77+
cd site && yarn build
78+
cd site && yarn export
7979
.PHONY: site/out

.eslintignore renamed to site/.eslintignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
# COPY PASTA OF .gitignore
33
###############################################################################
44
node_modules
5-
vendor
5+
vendor
6+
out
7+
coverage
8+
.next
File renamed without changes.

.prettierignore renamed to site/.prettierignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ yarn-error.log
1212

1313
# Front-end ignore
1414
.next/
15-
site/.next/
16-
site/out/
17-
coverage/
15+
coverage/
16+
out/
File renamed without changes.

_jest/setupTests.ts renamed to site/_jest/setupTests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
// Set up 'next-router-mock' to with our front-end tests:
66
// https://github.com/scottrippey/next-router-mock#quick-start
77
jest.mock("next/router", () => require("next-router-mock"))
8+
9+
// Suppress isolated modules warning
10+
export {}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import React from "react"
22

33
export interface ErrorSummaryProps {
4-
error: Error
4+
error: Error | undefined
55
}
66

77
export const ErrorSummary: React.FC<ErrorSummaryProps> = ({ error }) => {
88
// TODO: More interesting error page
9+
10+
if (typeof error === "undefined") {
11+
return <div>{"Unknown error"}</div>
12+
}
13+
914
return <div>{error.toString()}</div>
1015
}
File renamed without changes.

0 commit comments

Comments
 (0)