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

Setup shadcn ui library #1

Merged
merged 7 commits into from
Dec 17, 2024
Merged
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
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- master
- main
pull_request:

permissions:
Expand All @@ -25,17 +25,24 @@ jobs:
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"

# Cache node_modules
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- run: npm ci --legacy-peer-deps
- run: npx cypress install
- uses: nrwl/nx-set-shas@v4

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
# When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
- run: npx nx affected -t lint test build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ Thumbs.db
# Next.js
.next
out

vite.config.*.timestamp*
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run lint
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"singleQuote": true
}
"singleQuote": false
}
6 changes: 6 additions & 0 deletions apps/potato-lab-server/specs/index.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
describe("API endpoint", () => {
it("should return true", () => {
expect(true).toEqual(true);
});
});

5 changes: 4 additions & 1 deletion apps/potato-lab-web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
//@ts-check

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { composePlugins, withNx } = require('@nx/next');
const { composePlugins, withNx } = require("@nx/next");

/**
* @type {import('@nx/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = {
async redirects() {
return [{ source: "/", destination: "/dashboard", permanent: true }]; // Set to true for permanent redirect (308) or false for temporary redirect (307) },
},
nx: {
// Set this to true if you would like to use SVGR
// See: https://github.com/gregberge/svgr
Expand Down
16 changes: 16 additions & 0 deletions apps/potato-lab-web/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@
"buildTarget": "potato-lab-web:build:production"
}
}
},
"build": {
"executor": "@nx/next:build",
"outputs": [
"{options.outputPath}"
],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/apps/potato-lab-web"
},
"configurations": {
"development": {
"outputPath": "apps/potato-lab-web"
},
"production": {}
}
}
}
}
1 change: 1 addition & 0 deletions apps/potato-lab-web/public/potato_lab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/potato-lab-web/src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function Dashboard() {
return <div>Dashboard</div>;
}

export default Dashboard;
Loading
Loading