|
1 | 1 | # linid-im-front-community-plugins |
2 | 2 |
|
3 | | -To build catalog-ui: |
4 | | -npx vite build --config apps/catalog-ui/vite.config.ts |
| 3 | +Community plugins for LinID Identity Manager frontend. |
5 | 4 |
|
6 | | -to run locally: |
7 | | -nx run catalog-ui:preview |
| 5 | +## Installation |
8 | 6 |
|
| 7 | +This project uses **pnpm** as the package manager with Nx for monorepo management. |
| 8 | + |
| 9 | +### Quick start |
| 10 | + |
| 11 | +```sh |
| 12 | +# Enable Corepack (included with Node.js 16.9+) |
| 13 | +corepack enable |
| 14 | + |
| 15 | +# Install dependencies (Corepack will use pnpm@10.20.0 automatically) |
| 16 | +pnpm install |
| 17 | +``` |
| 18 | + |
| 19 | +**Note:** The `packageManager` field in `package.json` ensures everyone uses the same pnpm version (10.20.0). |
| 20 | + |
| 21 | +### Using pnpm (recommended) |
| 22 | + |
| 23 | +```sh |
| 24 | +# Install pnpm globally if you haven't already |
| 25 | +npm install -g pnpm |
| 26 | + |
| 27 | +# Install dependencies |
| 28 | +pnpm install |
| 29 | +``` |
| 30 | + |
| 31 | +## Development |
| 32 | + |
| 33 | +This is an Nx monorepo containing micro-frontend applications using Module Federation. |
| 34 | + |
| 35 | +### Build all projects |
| 36 | + |
| 37 | +```sh |
| 38 | +# With pnpm (recommended) |
| 39 | +pnpm build |
| 40 | + |
| 41 | +# With npm |
| 42 | +npm run build |
| 43 | +``` |
| 44 | + |
| 45 | +### Build catalog-ui |
| 46 | + |
| 47 | +```sh |
| 48 | +# Using Nx |
| 49 | +pnpm exec nx build catalog-ui |
| 50 | + |
| 51 | +# Or using the npm script |
| 52 | +pnpm catalog-ui:build |
| 53 | +``` |
| 54 | + |
| 55 | +### Run catalog-ui locally |
| 56 | + |
| 57 | +```sh |
| 58 | +# Preview the built catalog-ui |
| 59 | +pnpm exec nx run catalog-ui:preview |
| 60 | + |
| 61 | +# Or using the npm script |
| 62 | +pnpm catalog-ui:preview |
| 63 | +``` |
| 64 | + |
| 65 | +### Development server |
| 66 | + |
| 67 | +```sh |
| 68 | +# Start dev server for catalog-ui |
| 69 | +pnpm exec nx serve catalog-ui |
| 70 | +``` |
| 71 | + |
| 72 | +## Code Quality |
| 73 | + |
| 74 | +This project uses ESLint, Prettier, and TypeScript to ensure consistent code quality. |
| 75 | + |
| 76 | +### Run all checks |
| 77 | + |
| 78 | +```sh |
| 79 | +# Run linting, tests, build, and type checking for all projects |
| 80 | +pnpm exec nx run-many -t lint test build typecheck |
| 81 | +``` |
| 82 | + |
| 83 | +### Linting |
| 84 | + |
| 85 | +```sh |
| 86 | +# Lint all projects |
| 87 | +pnpm lint |
| 88 | + |
| 89 | +# Lint a specific project |
| 90 | +pnpm exec nx lint catalog-ui |
| 91 | +``` |
| 92 | + |
| 93 | +### Type Checking |
| 94 | + |
| 95 | +```sh |
| 96 | +# Type check all projects |
| 97 | +pnpm typecheck |
| 98 | + |
| 99 | +# Type check a specific project |
| 100 | +pnpm exec nx typecheck catalog-ui |
| 101 | +``` |
| 102 | + |
| 103 | +### Testing |
| 104 | + |
| 105 | +```sh |
| 106 | +# Run tests for all projects |
| 107 | +pnpm test |
| 108 | + |
| 109 | +# Run tests for a specific project |
| 110 | +pnpm exec nx test catalog-ui |
| 111 | +``` |
| 112 | + |
| 113 | +### Nx Commands |
| 114 | + |
| 115 | +```sh |
| 116 | +# View project graph |
| 117 | +pnpm exec nx graph |
| 118 | + |
| 119 | +# Clear Nx cache |
| 120 | +pnpm exec nx reset |
| 121 | +``` |
| 122 | + |
| 123 | +## CI/CD |
| 124 | + |
| 125 | +The project uses GitHub Actions for continuous integration. See [`.github/workflows/ci.yml`](.github/workflows/ci.yml) for details. |
| 126 | + |
| 127 | +## License |
| 128 | + |
| 129 | +This project is licensed under the GNU Affero General Public License version 3 - see [LICENSE](LICENSE.md) for details. |
0 commit comments