The open-source CapCut alternative
chore(tooling): replace turbo with moon, add proto toolchain
Maze Winther6c81db47c01b
diff --git a/.gitignore b/.gitignoreindex 1dbaf894..6f3a1e8c 100644--- a/.gitignore+++ b/.gitignore@@ -1,6 +1,9 @@node_modules/-.turbo/+dist/.env.env.*!.env.exampledocs/++# moon runtime cache+.moon/cache/diff --git a/.moon/toolchains.yml b/.moon/toolchains.ymlnew file mode 100644index 00000000..bcafd62b--- /dev/null+++ b/.moon/toolchains.yml@@ -0,0 +1,14 @@+$schema: 'https://moonrepo.dev/schemas/toolchains.json'++# javascript must be enabled alongside bun+javascript: {}++bun:+ version: '1.3.11'+ # Auto-install deps when lockfile/manifest changes+ installDependencies: true++# Rust toolchain — no crates yet, but enabling it now means+# moon will automatically understand Cargo.toml files and+# track Cargo.lock for hashing when they appear.+rust: {}diff --git a/.moon/workspace.yml b/.moon/workspace.ymlnew file mode 100644index 00000000..2f52bb98--- /dev/null+++ b/.moon/workspace.yml@@ -0,0 +1,6 @@+$schema: 'https://moonrepo.dev/schemas/workspace.json'++# Discover all projects under apps/ automatically.+# When Rust crates land, add a 'crates/*' glob here.+projects:+ - 'apps/*'diff --git a/.prototools b/.prototoolsnew file mode 100644index 00000000..da366ed1--- /dev/null+++ b/.prototools@@ -0,0 +1,4 @@+# proto pins tool versions workspace-wide.+# Every developer and CI machine gets the exact same versions automatically.+moon = "2.3.3"+bun = "1.3.11"diff --git a/README.md b/README.mdindex 7cb64fea..617893c8 100644--- a/README.md+++ b/README.md@@ -26,6 +26,26 @@You can still find the previous version at [opencut-app/opencut-classic](https://github.com/opencut-app/opencut-classic), which is the one to reach for today. [opencut.app](https://opencut.app) still runs the classic version; the rewrite will live at [new.opencut.app](https://new.opencut.app) until it's ready to take over.+## Development++Install [proto](https://moonrepo.dev/proto) if you haven't already:++```sh+bash <(curl -fsSL https://moonrepo.dev/install/proto.sh)+```++From the repo root:++```sh+proto use # installs bun + moon at the versions pinned in .prototools+bun install+```++```sh+moon run web:dev # localhost:5173+moon run api:dev # localhost:8787+```+## ContributingWe're not set up to take outside contributions yet while the architecture is being designed. If you want to follow along, ask questions, or just hang out, [join the Discord](https://discord.gg/zmR9N35cjK) or [open an issue](https://github.com/opencut-app/opencut/issues).diff --git a/apps/api/moon.yml b/apps/api/moon.ymlnew file mode 100644index 00000000..9ac80080--- /dev/null+++ b/apps/api/moon.yml@@ -0,0 +1,24 @@+$schema: 'https://moonrepo.dev/schemas/project.json'++language: 'typescript'+layer: 'application'++tasks:+ dev:+ command: 'bun run dev'+ options:+ runInCI: false # dev server — skipped in CI, never cached++ build:+ command: 'bun run build'+ inputs:+ - 'src/**/*'+ - 'wrangler.jsonc'+ - 'package.json'+ outputs:+ - 'dist'++ deploy:+ command: 'bun run deploy'+ deps:+ - '~:build'diff --git a/apps/web/moon.yml b/apps/web/moon.ymlnew file mode 100644index 00000000..cb7c1101--- /dev/null+++ b/apps/web/moon.yml@@ -0,0 +1,32 @@+$schema: 'https://moonrepo.dev/schemas/project.json'++language: 'typescript'+layer: 'application'++tasks:+ dev:+ command: 'bun run dev'+ options:+ runInCI: false # dev server — skipped in CI, never cached++ build:+ command: 'bun run build'+ inputs:+ - 'src/**/*'+ - 'public/**/*'+ - 'vite.config.ts'+ - 'tsconfig.json'+ - 'package.json'+ outputs:+ - 'dist'++ test:+ command: 'bun run test'+ inputs:+ - 'src/**/*'+ - 'tsconfig.json'++ deploy:+ command: 'bun run deploy'+ deps:+ - '~:build'diff --git a/package.json b/package.jsonindex c7b6a212..64a8a5db 100644--- a/package.json+++ b/package.json@@ -1,19 +1,14 @@{"name": "opencut","private": true,- "workspaces": ["apps/*", "architecture"],+ "workspaces": ["apps/*"],"scripts": {- "dev": "turbo dev",- "dev:web": "turbo dev --filter=@opencut/web",- "dev:architecture": "turbo dev --filter=@opencut/architecture",- "build": "turbo build",- "deploy": "turbo deploy"+ "dev": "moon run web:dev api:dev",+ "dev:web": "moon run web:dev",+ "dev:api": "moon run api:dev",+ "build": "moon run :build",+ "test": "moon run :test",+ "deploy": "moon run :deploy"},- "devDependencies": {- "turbo": "latest"- },- "packageManager": "[email protected]",- "dependencies": {- "opencut": "."- }+ "packageManager": "[email protected]"}diff --git a/turbo.json b/turbo.jsondeleted file mode 100644index da25cd2d..00000000--- a/turbo.json+++ /dev/null@@ -1,16 +0,0 @@-{- "$schema": "https://turbo.build/schema.json",- "tasks": {- "build": {- "dependsOn": ["^build"],- "outputs": [".output/**", "dist/**"]- },- "dev": {- "cache": false,- "persistent": true- },- "deploy": {- "dependsOn": ["build"]- }- }-}