-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ls1intum/2-issue-create-a-monoreopo-for-a…
…pollon2 feat: Create a monoreopo for apollon2
- Loading branch information
Showing
37 changed files
with
5,166 additions
and
4,894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
yarn commitlint --edit $1 | ||
npx --no -- commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
yarn prettier | ||
yarn lint:w | ||
npm run format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.18.0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# Monorepo Setup | ||
|
||
Welcome to the Apollon2 Monorepo! This repository uses **npm workspaces** to manage multiple packages (including a server, webapp, and library) in a single codebase. | ||
|
||
## Requirements | ||
|
||
Ensure you have the following installed: | ||
|
||
1. **Node.js**: | ||
|
||
- This project uses a specific Node.js version as indicated in the `.nvmrc` file. | ||
- Use [nvm (Node Version Manager)](https://github.com/nvm-sh/nvm) to install/manage Node versions: | ||
```bash | ||
brew install nvm | ||
``` | ||
Then, load `nvm` into your shell: | ||
```bash | ||
export NVM_DIR="$HOME/.nvm" | ||
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" | ||
``` | ||
|
||
Once `nvm` is set up: | ||
|
||
```bash | ||
nvm install | ||
nvm use | ||
``` | ||
|
||
2. **npm**(comes with Node.js): | ||
- This monorepo uses npm workspaces, which are supported out-of-the-box in npm 7+. | ||
- Verify your npm version: | ||
```bash | ||
npm -v | ||
``` | ||
|
||
## Setup Instructions | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone git@github.com:ls1intum/Apollon2.git | ||
cd Apollon2 | ||
``` | ||
|
||
2. Use the correct Node.js version: | ||
|
||
```bash | ||
nvm install | ||
nvm use | ||
``` | ||
|
||
3. Install dependencies for all packages: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
4. Build all packages: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
5. Start the project: | ||
```bash | ||
npm run start | ||
``` | ||
|
||
## Verifying Versions | ||
|
||
After setup, verify that you have the correct versions installed: | ||
|
||
- **Node.js:** | ||
```bash | ||
node -v | ||
``` | ||
This should match the version specified in the `.nvmrc` file. | ||
|
||
## Project Structure | ||
|
||
Here is a brief overview of the project structure: | ||
|
||
``` | ||
apollon2/ | ||
├── standalone/ | ||
│ ├── server/ | ||
│ │ ├── src/ | ||
│ │ ├── package.json | ||
│ │ └── ... | ||
│ └── webapp/ | ||
│ ├── src/ | ||
│ ├── package.json | ||
│ └── ... | ||
├── library | ||
│ ├── src/ | ||
│ ├── package.json | ||
| └── ... | ||
│ | ||
├── .nvmrc # Specifies the Node.js version | ||
├── .prettierrc # Configuration file for formating typescript files | ||
├── commitlint.config.mj # Checking commit messages in format | ||
└── README.md # Project documentation | ||
``` | ||
## Scripts Overview | ||
Here are the commonly used scripts defined in the monorepo: | ||
- **Install dependencies:** | ||
```bash | ||
npm install | ||
``` | ||
- **Build all packages:** | ||
```bash | ||
npm run build | ||
``` | ||
- **Start the project:** | ||
```bash | ||
npm run start | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
- If you encounter issues with Node.js versions, ensure you have the correct version installed by running: | ||
```bash | ||
nvm use | ||
``` | ||
- If a package fails to build, check its individual `package.json` for specific build scripts and dependencies. | ||
|
||
## Contributing | ||
|
||
We welcome contributions! Please follow the steps below to contribute: | ||
|
||
1. Fork the repository. | ||
2. Create a feature branch. | ||
3. Commit your changes and push them to your fork. | ||
4. Submit a pull request. | ||
|
||
Thank you for using and contributing to our monorepo! |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "@apollon2/library", | ||
"version": "0.0.1", | ||
"type": "module", | ||
"main": "dist/main.js", | ||
"types": "dist/main.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"sideEffects": [ | ||
"**/*.css" | ||
], | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc -b && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"peerDependencies": { | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1" | ||
}, | ||
"devDependencies": { | ||
"typescript": "5.7.2", | ||
"vite": "6.0.1", | ||
"@vitejs/plugin-react": "4.3.4" | ||
} | ||
} |
Oops, something went wrong.