From edec847eee4c65b2b9e628f3a91e3f822d40fed2 Mon Sep 17 00:00:00 2001 From: ArraysID Date: Sat, 26 Apr 2025 22:38:28 +0700 Subject: [PATCH] feat: update landing app with shadcnI integration --- apps/landing-e2e/eslint.config.mjs | 12 ----- apps/landing-e2e/playwright.config.ts | 68 --------------------------- apps/landing-e2e/project.json | 10 ---- apps/landing-e2e/src/example.spec.ts | 8 ---- apps/landing-e2e/tsconfig.json | 19 -------- apps/landing/postcss.config.mjs | 7 +++ apps/landing/src/app/layout.tsx | 5 +- apps/landing/src/app/page.tsx | 9 +++- apps/landing/src/data/metadata.json | 4 -- apps/landing/src/styles/globals.css | 3 ++ 10 files changed, 21 insertions(+), 124 deletions(-) delete mode 100644 apps/landing-e2e/eslint.config.mjs delete mode 100644 apps/landing-e2e/playwright.config.ts delete mode 100644 apps/landing-e2e/project.json delete mode 100644 apps/landing-e2e/src/example.spec.ts delete mode 100644 apps/landing-e2e/tsconfig.json create mode 100644 apps/landing/postcss.config.mjs delete mode 100644 apps/landing/src/data/metadata.json diff --git a/apps/landing-e2e/eslint.config.mjs b/apps/landing-e2e/eslint.config.mjs deleted file mode 100644 index b2e9fac..0000000 --- a/apps/landing-e2e/eslint.config.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import playwright from 'eslint-plugin-playwright'; -import baseConfig from '../../eslint.config.mjs'; - -export default [ - playwright.configs['flat/recommended'], - ...baseConfig, - { - files: ['**/*.ts', '**/*.js'], - // Override or add rules here - rules: {}, - }, -]; diff --git a/apps/landing-e2e/playwright.config.ts b/apps/landing-e2e/playwright.config.ts deleted file mode 100644 index 3816bd3..0000000 --- a/apps/landing-e2e/playwright.config.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { defineConfig, devices } from '@playwright/test'; -import { nxE2EPreset } from '@nx/playwright/preset'; -import { workspaceRoot } from '@nx/devkit'; - -// For CI, you may want to set BASE_URL to the deployed application. -const baseURL = process.env['BASE_URL'] || 'http://localhost:3000'; - -/** - * Read environment variables from file. - * https://github.com/motdotla/dotenv - */ -// require('dotenv').config(); - -/** - * See https://playwright.dev/docs/test-configuration. - */ -export default defineConfig({ - ...nxE2EPreset(__filename, { testDir: './src' }), - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ - use: { - baseURL, - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on-first-retry', - }, - /* Run your local dev server before starting the tests */ - webServer: { - command: 'npx nx run landing:start', - url: 'http://localhost:3000', - reuseExistingServer: !process.env.CI, - cwd: workspaceRoot, - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - - { - name: 'firefox', - use: { ...devices['Desktop Firefox'] }, - }, - - { - name: 'webkit', - use: { ...devices['Desktop Safari'] }, - }, - - // Uncomment for mobile browsers support - /* { - name: 'Mobile Chrome', - use: { ...devices['Pixel 5'] }, - }, - { - name: 'Mobile Safari', - use: { ...devices['iPhone 12'] }, - }, */ - - // Uncomment for branded browsers - /* { - name: 'Microsoft Edge', - use: { ...devices['Desktop Edge'], channel: 'msedge' }, - }, - { - name: 'Google Chrome', - use: { ...devices['Desktop Chrome'], channel: 'chrome' }, - } */ - ], -}); diff --git a/apps/landing-e2e/project.json b/apps/landing-e2e/project.json deleted file mode 100644 index 85bae06..0000000 --- a/apps/landing-e2e/project.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "landing-e2e", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/landing-e2e/src", - "tags": [], - "implicitDependencies": ["landing"], - "// targets": "to see all targets run: nx show project landing-e2e --web", - "targets": {} -} diff --git a/apps/landing-e2e/src/example.spec.ts b/apps/landing-e2e/src/example.spec.ts deleted file mode 100644 index fa8f1f3..0000000 --- a/apps/landing-e2e/src/example.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('has title', async ({ page }) => { - await page.goto('/'); - - // Expect h1 to contain a substring. - expect(await page.locator('h1').innerText()).toContain('Welcome'); -}); diff --git a/apps/landing-e2e/tsconfig.json b/apps/landing-e2e/tsconfig.json deleted file mode 100644 index d983df4..0000000 --- a/apps/landing-e2e/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "allowJs": true, - "outDir": "../../dist/out-tsc", - "sourceMap": false, - "module": "commonjs" - }, - "include": [ - "**/*.ts", - "**/*.js", - "playwright.config.ts", - "src/**/*.spec.ts", - "src/**/*.spec.js", - "src/**/*.test.ts", - "src/**/*.test.js", - "src/**/*.d.ts" - ] -} diff --git a/apps/landing/postcss.config.mjs b/apps/landing/postcss.config.mjs new file mode 100644 index 0000000..297374d --- /dev/null +++ b/apps/landing/postcss.config.mjs @@ -0,0 +1,7 @@ +const config = { + plugins: { + '@tailwindcss/postcss': {}, + }, +}; + +export default config; diff --git a/apps/landing/src/app/layout.tsx b/apps/landing/src/app/layout.tsx index 911b33f..ff826d2 100644 --- a/apps/landing/src/app/layout.tsx +++ b/apps/landing/src/app/layout.tsx @@ -1,8 +1,9 @@ import { type Metadata } from 'next'; -import { description, title } from '../data/metadata.json'; import '../styles/globals.css'; -export const metadata: Metadata = { title, description }; +export const metadata: Metadata = { + title: 'IMPHNEN', +}; export default function RootLayout({ children, diff --git a/apps/landing/src/app/page.tsx b/apps/landing/src/app/page.tsx index 7d1e0b7..aa95f7d 100644 --- a/apps/landing/src/app/page.tsx +++ b/apps/landing/src/app/page.tsx @@ -1,3 +1,10 @@ +import { Button } from '@imphnen-frontend-service/shadcn-ui/atoms'; + export default function Page() { - return <>; + return ( + <> +

Hello World

+ + + ); } diff --git a/apps/landing/src/data/metadata.json b/apps/landing/src/data/metadata.json deleted file mode 100644 index e0ac6b0..0000000 --- a/apps/landing/src/data/metadata.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "IMPHNEN", - "description": "" -} diff --git a/apps/landing/src/styles/globals.css b/apps/landing/src/styles/globals.css index d4b5078..6657941 100644 --- a/apps/landing/src/styles/globals.css +++ b/apps/landing/src/styles/globals.css @@ -1 +1,4 @@ @import 'tailwindcss'; +@import "tw-animate-css"; +@import "../../../../libs/shadcn-ui/src/index.css"; +@source "../../../../libs/shadcn-ui/src/atoms/**/*.{ts,tsx}";