---
# System prepended metadata

title: monorepo quick start

---

monorepo quick start

## monorepo steps
- sudo rm -R node_modules
- move projects to packages/
- create /package.json
  {
    "name": "kalani",
    "version": "0.1.0",
    "repository": "git@github.com:murderteeth/kalani.git",
    "author": "murderteeth <murdertxxth@gmail.com>",
    "license": "MIT",
    "private": true,
    "workspaces": [
      "packages/*"
    ],
    "scripts": {
      "dev": "(cd packages/web && next dev)",
      "dev:lib": "(cd packages/lib && next dev)",
      "build": "(cd packages/web && next build)"
    }
  }

- create /tsconfig.json
  {
    "compilerOptions": {
      "target": "esnext",
      "lib": ["esnext"],
      "allowJs": true,
      "skipLibCheck": true,
      "strict": true,
      "noEmit": true,
      "esModuleInterop": true,
      "module": "esnext",
      "moduleResolution": "bundler",
      "resolveJsonModule": true,
      "isolatedModules": true,
      "jsx": "preserve",
      "incremental": true,
      "plugins": [
        {
          "name": "next"
        }
      ],
      "paths": {
        "@/*": ["./*"]
      }
    },
    "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
    "exclude": ["node_modules"]
  }

- create /.gitignore
  /node_modules
  .DS_Store

- create new nextjs project at packages/lib
- add "cross-env": "5.0.5" to packages/**/package.json
- add "lib": "0.1.0" to packages/`project`/package.json
- add '../lib/components/**/*.{js,ts,jsx,tsx,mdx}' to packages/`project`/tailwind.config.ts, content: []
? add blank /extras.d.ts
- sort out .env files (can we just have locals to start?)
- test


