Skip to content

Commit

Permalink
change pnpm to bun
Browse files Browse the repository at this point in the history
1. script
2. md
3. workflow for check-code
  • Loading branch information
jojohoooo committed Sep 12, 2023
1 parent 8887061 commit 7f4e042
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10,265 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,17 @@ jobs:
with:
node-version: 18

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
version: 8.6.1
bun-version: latest

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install deps (with cache)
run: pnpm install
- name: Install deps
run: bun install

# TODO: Linting is failing because of contentlayer types, need to fix that
# - name: Run lint
# run: pnpm run lint
# run: bun run lint

- name: Run typecheck
run: pnpm run typecheck
run: bun run typecheck
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cd skateshop
Install the project dependencies:

```shell
pnpm install
bun install
```

### Create a branch
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ This is an open source e-commerce skateshop build with everything new in Next.js
git clone https://github.com/sadmann7/skateshop.git
```

2. Install dependencies using pnpm
2. Install dependencies using bun

```bash
pnpm install
bun install
```

3. Copy the `.env.example` to `.env` and update the variables.
Expand All @@ -59,19 +59,19 @@ cp .env.example .env
4. Start the development server

```bash
pnpm run dev
bun run dev
```

5. Push the database schema

```bash
pnpm run db:push
bun run db:push
```

6. Start the Stripe webhook listener

```bash
pnpm run stripe:listen
bun run stripe:listen
```

## How do I deploy this?
Expand Down
Binary file added bun.lockb
Binary file not shown.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"db:push": "drizzle-kit push:mysql",
"db:introspect": "drizzle-kit introspect:mysql",
"db:studio": "drizzle-kit studio --port 5000 --verbose",
"shadcn:add": "pnpm dlx shadcn-ui@latest add",
"shadcn:add": "bunx shadcn-ui@latest add",
"email:dev": "email dev --dir src/components/emails -p 3001",
"stripe:listen": "stripe listen --forward-to localhost:3000/api/webhooks/stripe --latest",
"unlighthouse": "pnpm dlx unlighthouse --site https://skateshop.sadmn.com"
"unlighthouse": "bunx unlighthouse --site https://skateshop.sadmn.com"
},
"dependencies": {
"@clerk/nextjs": "^4.23.5",
Expand Down Expand Up @@ -102,6 +102,7 @@
"autoprefixer": "^10.4.15",
"dotenv": "^16.3.1",
"drizzle-kit": "^0.19.13",
"encoding": "^0.1.13",
"eslint": "^8.48.0",
"eslint-config-next": "^13.4.19",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -112,6 +113,7 @@
"rehype-pretty-code": "^0.10.1",
"rehype-slug": "^6.0.0",
"remark-gfm": "^3.0.1",
"shiki": "^0.14.4",
"tailwindcss": "^3.3.3",
"typescript": "^5.2.2",
"unist-util-visit": "^5.0.0"
Expand Down
Loading

0 comments on commit 7f4e042

Please sign in to comment.