-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Move package.json and other front-end collateral into 'site' (
#128) This refactors the front-end collateral to all live within `site` - so no `package.json` at the root. The reason we had this initially is that the jest test run and NextJS actually require having _two_ different `tsconfig`s - Next needs `jsx:"preserve"`, while jest needs `jsx:"react"` - we were using `tsconfig`s at different levels at the hierarchy to manage this. I changed this behavior to still use two different `tsconfig.json`s, which is mandatory - but just side-by-side in `site`. Once that's fixed, it was easy to move everything into `site` Follow up from: #118 (comment)
- Loading branch information
1 parent
3ba8242
commit 78e652a
Showing
19 changed files
with
177 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,5 @@ yarn-error.log | |
|
||
# Front-end ignore | ||
.next/ | ||
site/.next/ | ||
site/out/ | ||
coverage/ | ||
coverage/ | ||
out/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import React from "react" | ||
|
||
export interface ErrorSummaryProps { | ||
error: Error | ||
error: Error | undefined | ||
} | ||
|
||
export const ErrorSummary: React.FC<ErrorSummaryProps> = ({ error }) => { | ||
// TODO: More interesting error page | ||
|
||
if (typeof error === "undefined") { | ||
return <div>{"Unknown error"}</div> | ||
} | ||
|
||
return <div>{error.toString()}</div> | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module.exports = { | ||
projects: [ | ||
{ | ||
globals: { | ||
"ts-jest": { | ||
tsconfig: "tsconfig.test.json", | ||
}, | ||
}, | ||
coverageReporters: ["text", "lcov"], | ||
displayName: "test", | ||
preset: "ts-jest", | ||
roots: ["<rootDir>"], | ||
setupFilesAfterEnv: ["<rootDir>/_jest/setupTests.ts"], | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest", | ||
}, | ||
testEnvironment: "jsdom", | ||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", | ||
testPathIgnorePatterns: ["/node_modules/", "/__tests__/fakes"], | ||
moduleDirectories: ["node_modules", "<rootDir>"], | ||
}, | ||
{ | ||
displayName: "lint", | ||
runner: "jest-runner-eslint", | ||
testMatch: ["<rootDir>/**/*.js", "<rootDir>/**/*.ts", "<rootDir>/**/*.tsx"], | ||
testPathIgnorePatterns: ["/.next/", "/out/", "/_jest/", "jest.config.js", "jest-runner.*.js", "next.config.js"], | ||
}, | ||
], | ||
collectCoverageFrom: [ | ||
"<rootDir>/**/*.js", | ||
"<rootDir>/**/*.ts", | ||
"<rootDir>/**/*.tsx", | ||
"!<rootDir>/**/*.stories.tsx", | ||
"!<rootDir>/.next/**/*.*", | ||
"!<rootDir>/api.ts", | ||
"!<rootDir>/dev.ts", | ||
"!<rootDir>/next-env.d.ts", | ||
"!<rootDir>/next.config.js", | ||
"!<rootDir>/out/**/*.*", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"jsx": "react", | ||
"downlevelIteration": true, | ||
"strict": true, | ||
"strictNullChecks": true, | ||
"esModuleInterop": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.