Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: setup tailwind and ui package for console #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions apps/console-electron/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import Link from 'next/link';

export default function Another() {
return (
<div
className={`grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]`}
>
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans">
<Link href="/">Go back</Link>
<p>Dashboard Page</p>
</div>
Expand Down
5 changes: 4 additions & 1 deletion apps/console-electron/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Button } from '@dicedb/ui/button';
import Link from 'next/link';

export default function Home() {
Expand All @@ -7,13 +8,15 @@
>
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<h1 className="lg">DiceDB</h1>
<img

Check warning on line 11 in apps/console-electron/app/page.tsx

View workflow job for this annotation

GitHub Actions / Build and Test

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
width={48}
height={48}
src="https://avatars.githubusercontent.com/u/112580013?s=48&v=4"
alt="logo"
/>
<Link href="/dashboard">Home</Link>
<Button variant="default">
<Link href="/dashboard">Home</Link>
</Button>
</main>
</div>
);
Expand Down
8 changes: 6 additions & 2 deletions apps/console-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"dependencies": {
"next": "14.2.15",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"@dicedb/ui": "workspace:*"
},
"devDependencies": {
"@dicedb/eslint-config": "workspace:*",
Expand All @@ -28,6 +29,9 @@
"eslint-config-next": "14.2.15",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"typescript": "^5",
"@dicedb/typescript-config": "workspace:*",
"@dicedb/eslint-config": "workspace:*",
Comment on lines +33 to +34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicates

"@dicedb/tailwind-config": "workspace:*"
}
}
10 changes: 5 additions & 5 deletions apps/console-electron/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { Config } from 'tailwindcss';
import baseConfig from '@dicedb/tailwind-config/base';

const config: Config = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
],
...baseConfig,
theme: {
extend: {
fontFamily: {
Assistant: ['Assistant'],
},
colors: {
background: 'var(--background)',
foreground: 'var(--foreground)',
Expand Down
5 changes: 0 additions & 5 deletions apps/playground-web/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import baseConfig from '@dicedb/tailwind-config/base';

const config: Config = {
...baseConfig,
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
fontFamily: {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"scripts": {
"build": "turbo build",
"build:playground": "turbo build --filter=@dicedb/playground-web --ui stream",
"build:console": "turbo build --filter=@dicedb/console-electron --ui stream",
"dev": "turbo dev",
"dev:playground": "turbo dev --filter=@dicedb/playground-web --ui stream",
"dev:console": "turbo dev --filter=@dicedb/console-electron --ui stream",
"lint": "turbo lint",
"format": "prettier -c ./.prettierrc --write \"**/*.{js,jsx,ts,tsx,json,css}\"",
"check:format": "prettier -c ./.prettierrc \"**/*.{js,jsx,ts,tsx,json,css}\"",
Expand Down
49 changes: 27 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 0 additions & 93 deletions src/lib/__tests__/api.test.ts

This file was deleted.

1 change: 1 addition & 0 deletions tooling/tailwind-config/base.tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const config: Config = {
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'../../packages/ui/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
Expand Down
Loading