diff --git a/apps/playground/app/api/hello/route.ts b/apps/playground/app/api/hello/route.ts deleted file mode 100644 index de70bac..0000000 --- a/apps/playground/app/api/hello/route.ts +++ /dev/null @@ -1,3 +0,0 @@ -export async function GET(request: Request) { - return new Response('Hello, from API!'); -} diff --git a/apps/playground/app/page.tsx b/apps/playground/app/page.tsx deleted file mode 100644 index a7c867c..0000000 --- a/apps/playground/app/page.tsx +++ /dev/null @@ -1,416 +0,0 @@ -import styles from './page.module.css'; - -export default async function Index() { - /* - * Replace the elements below with your own. - * - * Note: The corresponding styles are in the ./index.css file. - */ - return ( -
-
-
-
-

- Hello there, - Welcome playground 👋 -

-
- -
-
-

- - - - You're up and running -

- What's next? -
-
- - - -
-
- - - -
-

Next steps

-

Here are some things you can do with Nx:

-
- - - - - Add UI library - -
-                # Generate UI lib
-                nx g @nx/next:library ui
-                # Add a component
-                nx g @nx/next:component button --project=ui
-              
-
-
- - - - - View interactive project graph - -
nx graph
-
-
- - - - - Run affected commands - -
-                # see what's been affected by changes
-                nx affected:graph
-                # run tests for current changes
-                nx affected:test
-                # run e2e tests for current changes
-                nx affected:e2e
-              
-
-
- -

- Carefully crafted with - - - -

-
-
-
- ); -} diff --git a/apps/playground/.eslintrc.json b/apps/tester/.eslintrc.json similarity index 75% rename from apps/playground/.eslintrc.json rename to apps/tester/.eslintrc.json index 1ee3309..0ed9c76 100644 --- a/apps/playground/.eslintrc.json +++ b/apps/tester/.eslintrc.json @@ -1,5 +1,6 @@ { "extends": [ + "plugin:cypress/recommended", "plugin:@nx/react-typescript", "next", "next/core-web-vitals", @@ -16,7 +17,7 @@ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": { - "@next/next/no-html-link-for-pages": ["error", "apps/playground/pages"] + "@next/next/no-html-link-for-pages": ["error", "apps/tester/pages"] } }, { @@ -32,6 +33,10 @@ "env": { "jest": true } + }, + { + "files": ["*.cy.{ts,js,tsx,jsx}", "cypress/**/*.{ts,js,tsx,jsx}"], + "rules": {} } ] } diff --git a/apps/playground/app/global.css b/apps/tester/app/global.css similarity index 100% rename from apps/playground/app/global.css rename to apps/tester/app/global.css diff --git a/apps/playground/app/layout.tsx b/apps/tester/app/layout.tsx similarity index 88% rename from apps/playground/app/layout.tsx rename to apps/tester/app/layout.tsx index 9a5d952..acc1318 100644 --- a/apps/playground/app/layout.tsx +++ b/apps/tester/app/layout.tsx @@ -1,7 +1,7 @@ import './global.css'; export const metadata = { - title: 'Welcome to playground', + title: 'Welcome to tester', description: 'Generated by create-nx-workspace', }; diff --git a/apps/playground/app/page.module.css b/apps/tester/app/page.module.css similarity index 100% rename from apps/playground/app/page.module.css rename to apps/tester/app/page.module.css diff --git a/apps/tester/app/page.tsx b/apps/tester/app/page.tsx new file mode 100644 index 0000000..9090f01 --- /dev/null +++ b/apps/tester/app/page.tsx @@ -0,0 +1,23 @@ +import styles from './page.module.css'; + +export default async function Index() { + /* + * Replace the elements below with your own. + * + * Note: The corresponding styles are in the ./index.css file. + */ + return ( +
+
+
+
+

+ Hello there, + Welcome tester 👋 +

+
+
+
+
+ ); +} diff --git a/apps/playground/app/state/page.tsx b/apps/tester/app/state/page.tsx similarity index 81% rename from apps/playground/app/state/page.tsx rename to apps/tester/app/state/page.tsx index 8e2232a..c79ffd4 100644 --- a/apps/playground/app/state/page.tsx +++ b/apps/tester/app/state/page.tsx @@ -3,7 +3,7 @@ import { StateChanger } from '../../components/StateChanger'; export default async function Index() { return (
-

Welcome to playground!

+

Welcome to tester!

diff --git a/apps/playground/components/Button.tsx b/apps/tester/components/Button.tsx similarity index 96% rename from apps/playground/components/Button.tsx rename to apps/tester/components/Button.tsx index d8692c2..6f831c4 100644 --- a/apps/playground/components/Button.tsx +++ b/apps/tester/components/Button.tsx @@ -1,10 +1,10 @@ -import { ButtonHTMLAttributes } from 'react'; - -export type ButtonProps = React.ComponentPropsWithoutRef<"button">; - -export function Button(props: ButtonProps) { - return -