Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
clear out styling, testing
Browse files Browse the repository at this point in the history
  • Loading branch information
buckhalt committed Apr 22, 2024
1 parent a5318cf commit ad3217c
Show file tree
Hide file tree
Showing 35 changed files with 9 additions and 409 deletions.
10 changes: 0 additions & 10 deletions .stylelintrc

This file was deleted.

20 changes: 0 additions & 20 deletions @react-vite-trpc/ui/package.json

This file was deleted.

18 changes: 0 additions & 18 deletions @react-vite-trpc/ui/src/Label.tsx

This file was deleted.

1 change: 0 additions & 1 deletion @react-vite-trpc/ui/src/index.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions @react-vite-trpc/ui/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion apps/server/.env.test-example

This file was deleted.

13 changes: 1 addition & 12 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@
"lint:fix": "eslint . --fix",
"ts:check": "tsc -b",
"check": "pnpm lint && pnpm ts:check",
"build": "tsc -b",
"test:unit": "vitest .unit.test.ts",
"test:unit:run": "pnpm test:unit --run",
"test:integration": "vitest .integration.test.ts",
"test:integration:run": "pnpm test:integration --run",
"test:e2e": "vitest .e2e.test.ts",
"test:e2e:run": "pnpm test:e2e --run",
"test:coverage": "pnpm pm2:start && vitest run --coverage && pnpm pm2:delete",
"test:coverage:preview": "pnpm test:coverage && vite preview --outDir ./coverage --open"
"build": "tsc -b"
},
"dependencies": {
"@trpc/server": "^10.29.1",
Expand All @@ -45,10 +37,7 @@
"fs-extra": "^11.1.1",
"module-alias": "^2.2.3",
"nodemon": "^2.0.22",
"ts-node": "^10.9.1",
"@vitest/coverage-istanbul": "^0.34.1",
"typescript": "^4.9.5",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"pm2": "^5.3.0"
}
}
84 changes: 0 additions & 84 deletions apps/server/src/aliases.unit.test.ts

This file was deleted.

12 changes: 0 additions & 12 deletions apps/server/src/trpc/api/resolvers/getRole/getRole.e2e.test.ts

This file was deleted.

This file was deleted.

6 changes: 1 addition & 5 deletions apps/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"baseUrl": "src",
"outDir": "dist"
},
"include": [
"src",
"vite.config.ts",
"vitest.setup.ts"
],
"include": ["src", "vite.config.ts"],
"references": [
{
"path": "../../@react-vite-trpc/config/tsconfig.json"
Expand Down
5 changes: 0 additions & 5 deletions apps/server/vitest.config.ts

This file was deleted.

3 changes: 0 additions & 3 deletions apps/server/vitest.setup.ts

This file was deleted.

3 changes: 0 additions & 3 deletions apps/web/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@

"^assets(.*)",

"(.*)styled$",
"(.*)styled/(.*)",

"^components/shared$",

"^components(.*)",
Expand Down
9 changes: 0 additions & 9 deletions apps/web/cypress.config.ts

This file was deleted.

5 changes: 0 additions & 5 deletions apps/web/cypress/e2e/Home.cy.ts

This file was deleted.

30 changes: 3 additions & 27 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,8 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"ts:check": "tsc -b",
"stylelint": "stylelint src/**/*.{ts,tsx,scss}",
"check": "pnpm lint && pnpm ts:check && pnpm stylelint",
"build": "pnpm ts:check && vite build",
"test:unit": "vitest .unit.test.ts .unit.test.tsx",
"test:unit:run": "pnpm test:unit --run",
"test:integration": "vitest .integration.test.ts .integration.test.tsx",
"test:integration:run": "pnpm test:integration --run",
"test:e2e": "cypress run --browser chrome",
"test:e2e:run": "cypress run",
"test:coverage": "vitest run --coverage",
"test:coverage:preview": "pnpm test:coverage && vite preview --outDir ./coverage --open",
"cypress": "cypress open",
"cypress:install": "cypress install"
"build": "pnpm ts:check && vite build"
},
"dependencies": {
"@react-vite-trpc/ui": "workspace:*",
Expand All @@ -30,32 +19,19 @@
"@trpc/server": "^10.29.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
"styled-components": "^5.3.11"
"react-query": "^3.39.3"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@types/testing-library__jest-dom": "^5.14.9",
"@types/jest": "^29.5.3",
"@types/react": "^18.2.11",
"@types/react-dom": "^18.2.4",
"cypress": "^12.17.3",
"@vitest/coverage-istanbul": "^0.34.1",
"@types/styled-components": "^5.1.26",
"@vitejs/plugin-react": "^3.1.0",
"sass": "^1.63.3",
"envalid": "^7.3.1",
"@tanstack/router": "0.0.1-beta.139",
"postcss-styled-syntax": "^0.4.0",
"stylelint": "^15.10.2",
"jsdom": "^22.1.0",
"typescript": "^4.9.5",
"vite": "^4.3.9",
"vitest": "^0.34.1",
"vite-tsconfig-paths": "^4.2.0",
"@react-vite-trpc/tsconfig": "workspace:*",
"@react-vite-trpc/eslint-config": "workspace:*",
"@trivago/prettier-plugin-sort-imports": "^4.2.0"
"@react-vite-trpc/eslint-config": "workspace:*"
}
}
14 changes: 1 addition & 13 deletions apps/web/src/components/core/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { Outlet, RootRoute, Route, Router, RouterProvider } from '@tanstack/router'
import styled from 'styled-components'

import { GlobalStyle } from 'styles'

import { Home } from 'components/features'

Expand All @@ -19,16 +16,7 @@ const router = new Router({ routeTree })

window.navigate = router.navigate

export const App = () => (
<AppContainer>
<GlobalStyle />
<RouterProvider router={router} />
</AppContainer>
)

const AppContainer = styled.div`
height: 100%;
`
export const App = () => <RouterProvider router={router} />

declare global {
interface Window {
Expand Down
25 changes: 1 addition & 24 deletions apps/web/src/components/features/Home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
import styled from 'styled-components'

import { Label } from '@react-vite-trpc/ui'

import { trpc } from 'trpc'

import * as Styled from './styled'

export const Home = () => {
const { data } = trpc.getRole.useQuery()

return (
<HomeContainer>
<Label>Current role: {data?.role}</Label>
<Styled.Gif
src="https://media.giphy.com/media/Dh5q0sShxgp13DwrvG/giphy.gif"
alt="I have no idea what I'm doing"
/>
</HomeContainer>
)
return <div>Current role: {data?.role}</div>
}

const HomeContainer = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
background: linear-gradient(to right, #434343, #000000);
`
5 changes: 0 additions & 5 deletions apps/web/src/components/features/Home/styled/Gif.tsx

This file was deleted.

1 change: 0 additions & 1 deletion apps/web/src/components/features/Home/styled/index.ts

This file was deleted.

8 changes: 1 addition & 7 deletions apps/web/src/components/shared/Providers.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import { QueryClientProvider } from '@tanstack/react-query'
import { type PropsWithChildren } from 'react'
import { ThemeProvider } from 'styled-components'

import { trpc } from 'trpc'

import { theme } from 'styles'
import 'styles/index.scss'

import { useTrpc } from 'hooks'

export const Providers = ({ children }: PropsWithChildren) => {
const { trpcQueryClient, trpcClient } = useTrpc()

return (
<trpc.Provider client={trpcClient} queryClient={trpcQueryClient}>
<QueryClientProvider client={trpcQueryClient}>
<ThemeProvider theme={theme}>{children}</ThemeProvider>
</QueryClientProvider>
<QueryClientProvider client={trpcQueryClient}>{children}</QueryClientProvider>
</trpc.Provider>
)
}
Loading

0 comments on commit ad3217c

Please sign in to comment.