Skip to content

Commit

Permalink
Merge branch 'bun'
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Miller committed Oct 28, 2023
2 parents 5e61768 + 5b9d8c2 commit 0adb1a0
Show file tree
Hide file tree
Showing 35 changed files with 196 additions and 19,104 deletions.
87 changes: 0 additions & 87 deletions .github/actions/pnpm-install/action.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/script/submit-android

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ jobs:
with:
fetch-depth: 1

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: 'Bun setup'
uses: oven-sh/setup-bun@v1
with:
node-version: 18
bun-version: latest

- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
- name: 'Bun install'
run: bun install

- name: Migrate database
run: pnpm --filter @t4/api migrate
run: cd packages/api && bun run migrate
env:
NO_D1_WARNING: true
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}

- name: Deploy
uses: cloudflare/wrangler-action@v3.1.0
uses: cloudflare/wrangler-action@v3.3.1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: packages/api
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
with:
fetch-depth: 1

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: 'Bun setup'
uses: oven-sh/setup-bun@v1
with:
node-version: 18
bun-version: latest

- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
- name: 'Bun install'
run: bun install

- name: Build
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/expo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
with:
fetch-depth: 1

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: 'Bun setup'
uses: oven-sh/setup-bun@v1
with:
node-version: 18
bun-version: latest

- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
- name: 'Bun install'
run: bun install

- name: Setup EAS
uses: expo/expo-github-action@v8
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
with:
fetch-depth: 1

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: 'Bun setup'
uses: oven-sh/setup-bun@v1
with:
node-version: 18
bun-version: latest

- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
- name: 'Bun install'
run: bun install

- name: Build
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:

- name: 📥 Monorepo install
# if: steps.check.outputs.changed == 'true'
uses: ./.github/actions/pnpm-install
uses: ./.github/actions/bun-install

- name: Publish
# if: steps.check.outputs.changed == 'true'
run: cd apps/vscode && pnpm dlx @vscode/vsce publish --no-dependencies -p ${{ secrets.VSCE_TOKEN }}
run: cd apps/vscode && bun dlx @vscode/vsce publish --no-dependencies -p ${{ secrets.VSCE_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.bun-debug.log*

# local env files
**.env
Expand Down
6 changes: 2 additions & 4 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: pnpm install && pnpm run build
command: pnpm run dev


- init: bun install && bun run build
command: bun run dev
10 changes: 0 additions & 10 deletions .npmrc

This file was deleted.

5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"LICENSE": false,
".gitpod.yml": false,
".npmrc": false,
"pnpm-workspace.yaml": false,
"bun-workspace.yaml": false,
"renovate.json": false,
"turbo.json": false,
"**/cfImageLoader.js": false,
Expand All @@ -50,11 +50,10 @@
"search.exclude": {
"**/out": true
},
"explorerExclude.backup": {},
"typescript.tsdk": "node_modules/typescript/lib",
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"package.json": "package-lock.json, pnpm-lock.yaml",
"package.json": "package-lock.json, bun-lock.yaml",
"*.js": "${capture}.js.map, ${capture}.d.ts, ${capture}.d.ts.map",
"*.ts": "$(capture).test.ts, $(capture).test.tsx, $(capture).test.node.ts, $(capture).test.node.tsx, $(capture).test.native.ts, $(capture).test.native.tsx, $(capture).test.ios.ts, $(capture).test.ios.tsx, $(capture).test.web.ts, $(capture).test.web.tsx, $(capture).test.android.ts, $(capture).test.android.tsx, ${capture}.native.tsx, ${capture}.ios.tsx, ${capture}.android.tsx, ${capture}.web.tsx, ${capture}.native.ts, ${capture}.ios.ts, ${capture}.android.ts, ${capture}.web.ts, ${capture}.native.js, ${capture}.ios.js, ${capture}.android.js, ${capture}.web.js, ${capture}.native.jsx, ${capture}.ios.jsx, ${capture}.android.jsx, ${capture}.web.jsx",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).test.node.ts, $(capture).test.node.tsx, $(capture).test.native.ts, $(capture).test.native.tsx, $(capture).test.ios.ts, $(capture).test.ios.tsx, $(capture).test.web.ts, $(capture).test.web.tsx, $(capture).test.android.ts, $(capture).test.android.tsx, ${capture}.native.tsx, ${capture}.ios.tsx, ${capture}.android.tsx, ${capture}.web.tsx, ${capture}.native.ts, ${capture}.ios.ts, ${capture}.android.ts, ${capture}.web.ts, ${capture}.native.js, ${capture}.ios.js, ${capture}.android.js, ${capture}.web.js, ${capture}.native.jsx, ${capture}.ios.jsx, ${capture}.android.jsx, ${capture}.web.jsx"
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</p>

<p align="center">
Get started with the <a rel="noopener noreferrer" target="_blank" href="https://t4stack.com">T4 Stack</a> by running <code>pnpm create t4-app</code>
Get started with the <a rel="noopener noreferrer" target="_blank" href="https://t4stack.com">T4 Stack</a> by running <code>bun create t4-app</code>
</p>

<p align="center">
Expand Down Expand Up @@ -122,28 +122,28 @@ Build native apps for iOS, Android, macOS, Windows, and Linux using the same cod

### Basic Setup

> pnpm v8.6 is required to use `create-t4-app`
> bun v8.6 is required to use `create-t4-app`
<p align="left">
<a href="https://pnpm.io">
<img src="https://img.shields.io/badge/pnpm-%234a4a4a.svg?style=for-the-badge&logo=pnpm&logoColor=f69220" alt="pnpm is required to use `create-t4-app`">
<a href="https://bun.io">
<img src="https://img.shields.io/badge/bun-%234a4a4a.svg?style=for-the-badge&logo=bun&logoColor=f69220" alt="bun is required to use `create-t4-app`">
</a>
</p>

To scaffold an app using `create-t4-app`, run any of the following commands.

### **pnpm**
### **bun**

```bash
pnpm create t4-app
bun create t4-app
```

### **Tauri**

If you would like to use Tauri use:

```bash
pnpm create t4-app --tauri
bun create t4-app --tauri
```

## ❓ Why T4?
Expand Down Expand Up @@ -177,7 +177,7 @@ The VSCode extension is optional but highly recommended. It provides a better de
## ✨ Features

- ✅ Tamagui UI kit across all platforms.
-PNPM support
-bun support
- ✅ Million.js Support
- ✅ Supabase Auth
- ✅ Uses Next.js for building web apps.
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Security Policy for T4 App

### Reporting Security Vulnerabilities
## Reporting Security Vulnerabilities

We take the security of our project seriously and appreciate any efforts to responsibly disclose vulnerabilities. If you discover any security vulnerabilities or potential threats in our T4 App, please report them to our security team by emailing [email protected]. We request that you provide us with sufficient information to reproduce the vulnerability, including steps to replicate, affected versions, and any additional details that may be helpful for our investigation.

Expand Down
8 changes: 4 additions & 4 deletions apps/cli/bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const removeUnnecessaryFiles = async (folderName) => {
const installDependencies = async (folderName) => {
const installSpinner = ora(chalk.green.bold('Installing dependencies')).start()
try {
await exec(`cd ${folderName} && pnpm install`)
await exec(`cd ${folderName} && bun install`)
installSpinner.succeed()
} catch (error) {
installSpinner.fail()
Expand All @@ -84,7 +84,7 @@ const installDependencies = async (folderName) => {
const generateDrizzleClient = async (folderName) => {
const drizzleSpinner = ora(chalk.green.bold('Generating Drizzle client')).start()
try {
await exec(`cd ${folderName} && pnpm generate`)
await exec(`cd ${folderName} && bun generate`)
drizzleSpinner.succeed()
} catch (error) {
drizzleSpinner.fail()
Expand Down Expand Up @@ -125,8 +125,8 @@ This script follows the steps below to create your project:
console.log(chalk.green.bold(`
🚀 Successfully created t4 project!
Make sure you have a Supabase account and have created a new project.
After filling out your .env file, run 'pnpm migrate:local' to create your database tables.
To start the API and web development servers, run 'pnpm api' and 'pnpm web' in separate terminal tabs.
After filling out your .env file, run 'bun migrate:local' to create your database tables.
To start the API and web development servers, run 'bun api' and 'bun web' in separate terminal tabs.
`))
} catch (error) {
console.error(chalk.red.bold(`🚫 Error: ${error.message}`))
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
},
"homepage": "https://github.com/timothymiller/t4-app#readme",
"dependencies": {
"@ducanh2912/next-pwa": "^9.7.2",
"@t4/ui": "^2.0.0",
"million": "2.6.2",
"next": "13.5.3",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"@ducanh2912/next-pwa": "^9.6.0",
"@t4/ui": "*",
"million": "2.6.0-beta.16",
"next": "13.5.1",
"nextra": "^2.12.3",
"nextra-theme-docs": "^2.12.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Prisma is not supported in Cloudflare Workers because it's a chunky boi in terms

## Supabase warning logged in local dev

If you see this warning in your console when running `pnpm web`. You can safely ignore it.
If you see this warning in your console when running `bun web`. You can safely ignore it.

```bash
No storage option exists to persist the session, which may result in unexpected behavior when using auth.
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/pages/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
## 🚀 Getting Started

> pnpm v8.6+ is required to use `create-t4-app`
> bun v8.6+ is required to use `create-t4-app`
To scaffold an app using `create-t4-app`, run any of the following commands.

### **pnpm**
### **bun**

```bash
pnpm create t4-app
bun create t4-app
```

### **Tauri**

If you would like to use Tauri use:

```bash
pnpm create t4-app yourappname --tauri
bun create t4-app yourappname --tauri
```
2 changes: 1 addition & 1 deletion apps/docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Build native apps for iOS, Android, macOS, Windows, and Linux using the same cod
## ✨ Features

- ✅ Tamagui UI kit across all platforms.
-PNPM support
-bun support
- ✅ Million.js Support
- ✅ Supabase Auth
- ✅ Uses Next.js for building web apps.
Expand Down
Loading

1 comment on commit 0adb1a0

@github-actions
Copy link

Choose a reason for hiding this comment

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

✔ EAS production build completed

  • 🤖 Android build failed ❌
  • 🍏 IOS build failed ❌
Android QR IOS QR

Please sign in to comment.