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: https://github.com/coder/coder/pull/118#discussion_r796244577
This commit is contained in:
Bryan
2022-02-01 13:34:43 -08:00
committed by GitHub
parent 3ba8242764
commit 78e652a268
19 changed files with 177 additions and 148 deletions
-67
View File
@@ -1,67 +0,0 @@
{
"name": "coder-v2",
"description": "Coder V2 (Workspaces V2)",
"repository": "https://github.com/coder/coder",
"private": true,
"scripts": {
"build": "NODE_ENV=production next build site",
"build:dev": "next build site",
"dev": "ts-node site/dev.ts",
"export": "next export site",
"format:check": "prettier --check '**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}'",
"format:write": "prettier --write '**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}' && sql-formatter -l postgresql ./database/query.sql -o ./database/query.sql",
"lint": "jest --selectProjects lint",
"lint:fix": "FIX=true yarn lint",
"test": "jest --selectProjects test",
"test:coverage": "jest --selectProjects test --collectCoverage"
},
"devDependencies": {
"@material-ui/core": "4.9.4",
"@material-ui/icons": "4.5.1",
"@material-ui/lab": "4.0.0-alpha.42",
"@testing-library/react": "12.1.2",
"@types/express": "4.17.13",
"@types/jest": "27.4.0",
"@types/node": "14.18.9",
"@types/react": "17.0.38",
"@types/react-dom": "17.0.11",
"@types/superagent": "4.1.15",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-typescript": "2.5.0",
"eslint-plugin-compat": "4.0.1",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jest": "26.0.0",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-no-storage": "1.0.2",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react-hooks": "4.3.0",
"express": "4.17.2",
"formik": "2.2.9",
"http-proxy-middleware": "2.0.2",
"jest": "27.4.7",
"jest-runner-eslint": "1.0.0",
"next": "12.0.9",
"next-router-mock": "^0.6.5",
"prettier": "2.5.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"sql-formatter": "^4.0.2",
"swr": "1.2.0",
"ts-jest": "27.1.3",
"ts-loader": "9.2.6",
"ts-node": "10.4.0",
"typescript": "4.5.5",
"yup": "0.32.11"
},
"dependencies": {},
"browserslist": [
"chrome 66",
"firefox 63",
"edge 79",
"safari 13.1"
]
}