Skip to content

Commit

Permalink
Migrate to Turborepo (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferothefox authored Jul 5, 2024
1 parent 6fa1acc commit 0f2ddb4
Show file tree
Hide file tree
Showing 811 changed files with 6,245 additions and 8,454 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

Binary file added .github/assets/app_cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/monorepo_cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/web_cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@ Thumbs.db
.nitro
.cache

# knossos generated files
apps/knossos/src/generated
# frontend generated files
apps/frontend/src/generated

.turbo
target
generated
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
/.nx/workspace-data
/.turbo
14 changes: 13 additions & 1 deletion COPYING.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
TODO: write licensing info
# Copying Guidelines

All packages in this repository are licensed under their respective licenses. For more information, refer to the LICENSE file in each package.

For detailed information, consult each package's COPYING.md file, if available.

## Modrinth Branding

The use of Modrinth branding elements, including but not limited to the wrench-in-labyrinth logo, the landing image, and any variations thereof, is strictly prohibited without explicit written permission from Rinth, Inc. This includes trademarks, logos, or other branding elements.

All rights reserved. © 2020-2024 Rinth, Inc.

If you fork this repository, you must remove all Modrinth branding assets from your fork.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

[workspace]
resolver = '2'
members = [
'./libs/theseus',
'./libs/theseus_macros',
'./apps/theseus_playground',
'./apps/theseus_gui_rs',
'./packages/app-lib',
'./packages/app-macros',
'./apps/app-playground',
'./apps/app/src-tauri'
]

[profile.dev]
Expand Down
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# Olympus (Modrinth monorepo)
# ![Modrinth Logo on Mount Olympus](/.github/assets/monorepo_cover.png)

TODO: write rest of readme
![Issues](https://img.shields.io/github/issues-raw/Modrinth/olympus?color=c78aff&label=issues&style=for-the-badge)
![Pull Requests](https://img.shields.io/github/issues-pr-raw/Modrinth/olympus?color=c78aff&label=PRs&style=for-the-badge)
![Contributors](https://img.shields.io/github/contributors/Modrinth/olympus?color=c78aff&label=contributors&style=for-the-badge)
![Lines](https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/modrinth/olympus/badge?style=flat&logoColor=white&color=c78aff&style=for-the-badge)
![Commit Activity](https://img.shields.io/github/commit-activity/m/Modrinth/olympus?color=c78aff&label=commits&style=for-the-badge)
![Last Commit](https://img.shields.io/github/last-commit/Modrinth/olympus?color=c78aff&label=last%20commit&style=for-the-badge)

## Modrinth Monorepo

Welcome to the Modrinth Monorepo, the primary codebase for the Modrinth web interface and app. It contains ![Lines](https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/modrinth/olympus/badge?logoColor=white&color=black&label=) lines of code and has ![Contributors](https://img.shields.io/github/contributors/Modrinth/olympus?color=black&label=) contributors!

If you're not a developer and you've stumbled upon this repository, you can access the web interface on the [Modrinth website](https://modrinth.com) and download the latest release of the app [here](https://modrinth.com/app).

## Development

This repository contains two primary packages. For detailed development information, please refer to their respective READMEs:

- [Web Interface](apps/frontend/README.md)
- [Desktop App](apps/app/README.md)

## Contributing

We welcome contributions! Before submitting any contributions, please read our [contributing guidelines](https://support.modrinth.com/en/articles/8802215-contributing-to-modrinth).

If you plan to fork this repository for your own purposes, please review our [copying guidelines](COPYING.md).

## Security

If you discover a security vulnerability within our codebase, please follow our [responsible disclosure guidelines](https://modrinth.com/legal/security).

## Support

If you need help with the Modrinth web interface or app, please visit our [support page](https://support.modrinth.com). For general inquiries, you can also join our [Discord server](https://discord.gg/modrinth).

## License

All packages in this repository are licensed under their respective licenses. Refer to the LICENSE file in each package for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
theseus = { path = "../../libs/theseus", features = ["cli"] }
theseus = { path = "../../packages/app-lib", features = ["cli"] }

serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions apps/app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:vue/vue3-recommended", "prettier"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["vue"],
"rules": {
"no-console": "off",
"vue/no-v-html": "off",
"comma-dangle": ["error", "only-multiline"],
"vue/comment-directive": "off",
"vue/multi-word-component-names": "off",
"import/no-named-as-default": "off"
}
}
2 changes: 1 addition & 1 deletion apps/theseus-gui/COPYING.md → apps/app/COPYING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The source code of the theseus repository is licensed under the GNU General Publ

## Modrinth logo

Any files depicting the Modrinth branding, including the wrench-in-labyrinth logo, the landing image, and variations thereof, are licensed as follows:
The use of Modrinth branding elements, including but not limited to the wrench-in-labyrinth logo, the landing image, and any variations thereof, is strictly prohibited without explicit written permission from Rinth, Inc. This includes trademarks, logos, or other branding elements.

> All rights reserved. © 2020-2023 Rinth, Inc.
Expand Down
File renamed without changes.
29 changes: 29 additions & 0 deletions apps/app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ![Modrinth App](/.github/assets/app_cover.png)

## Modrinth App

The Modrinth App is a desktop application for managing your Minecraft mods. It is built with [Tauri](https://tauri.app/) and [Vue](https://vuejs.org/).

If you're not a developer and you've stumbled upon this repository, you can download the latest release of the app from the [Modrinth website](https://modrinth.com/app).

## Development

### Pre-requisites

Before you begin, ensure you have the following installed on your machine:

- [Node.js](https://nodejs.org/en/)
- [pnpm](https://pnpm.io/)
- [Rust](https://www.rust-lang.org/tools/install)
- [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites/#installing)

### Setup

Follow these steps to set up your development environment:

```bash
pnpm install
cargo tauri dev # `pnpm app:dev` is currently broken, contributions welcome!
```

You should now have a development build of the app running with hot-reloading enabled. Any changes you make to the code will automatically refresh the app.
File renamed without changes.
51 changes: 51 additions & 0 deletions apps/app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "@modrinth/app",
"private": true,
"version": "0.7.2",
"type": "module",
"scripts": {
"vite:dev": "vite",
"vite:build": "vite build",
"vite:preview": "vite preview",
"tauri": "tauri",
"tauri:build": "tauri build",
"tauri:dev": "tauri dev",
"dev": "tauri dev",
"lint:js": "eslint --ext .js,.vue,.ts,.jsx,.tsx,.html,.vue .",
"lint": "pnpm run lint:js && prettier --check .",
"fix": "eslint --fix --ext .js,.vue,.ts,.jsx,.tsx,.html,.vue . && prettier --write ."
},
"dependencies": {
"@modrinth/assets": "workspace:*",
"@modrinth/ui": "workspace:*",
"@modrinth/utils": "workspace:*",
"@tauri-apps/api": "^1.5.3",
"@vintl/vintl": "^4.4.1",
"dayjs": "^1.11.10",
"floating-vue": "^5.2.2",
"mixpanel-browser": "^2.49.0",
"ofetch": "^1.3.4",
"omorphia": "^0.4.41",
"pinia": "^2.1.7",
"tauri-plugin-window-state-api": "github:tauri-apps/tauri-plugin-window-state#v1",
"vite-svg-loader": "^5.1.0",
"vue": "^3.4.21",
"vue-multiselect": "3.0.0-beta.3",
"vue-router": "4.3.0",
"vue-virtual-scroller": "2.0.0-beta.8"
},
"devDependencies": {
"@tauri-apps/cli": "^1.5.11",
"@vitejs/plugin-vue": "^5.0.4",
"eslint": "^8.57.0",
"eslint-config-custom": "workspace:*",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.24.0",
"prettier": "^3.2.5",
"sass": "^1.74.1",
"tsconfig": "workspace:*",
"vite": "^5.2.8",
"vite-plugin-eslint": "^1.8.1"
},
"packageManager": "[email protected]"
}
4 changes: 4 additions & 0 deletions apps/app/src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
/target/

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "theseus_gui_rs"
name = "theseus_gui"
version = "0.7.2"
description = "A Tauri App"
authors = ["you"]
Expand All @@ -14,7 +14,7 @@ build = "build.rs"
tauri-build = { version = "1.3", features = [] }

[dependencies]
theseus = { path = "../../libs/theseus", features = ["tauri"] }
theseus = { path = "../../../packages/app-lib", features = ["tauri"] }

serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"build": {
"beforeDevCommand": "nx serve theseus-gui",
"beforeBuildCommand": "echo Building Rust Application...",
"beforeDevCommand": "pnpm run --filter=@modrinth/app vite:dev",
"beforeBuildCommand": "pnpm build",
"devPath": "http://localhost:1420",
"distDir": "../../dist/apps/theseus-gui",
"distDir": "../../../dist/apps/app",
"withGlobalTauri": false
},
"package": {
Expand Down Expand Up @@ -55,12 +55,7 @@
"depends": []
},
"externalBin": [],
"icon": [
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"icon": ["icons/128x128.png", "icons/[email protected]", "icons/icon.icns", "icons/icon.ico"],
"identifier": "com.modrinth.theseus",
"longDescription": "",
"macOS": {
Expand Down
File renamed without changes.
6 changes: 2 additions & 4 deletions apps/theseus-gui/src/App.vue → apps/app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import {
PlusIcon,
SettingsIcon,
FileIcon,
Button,
Notifications,
XIcon,
Card,
} from '@modrinth/omorphia'
} from '@modrinth/assets'
import { Button, Notifications, Card } from '@modrinth/ui'
import { useLoading, useTheming } from '@/store/state'
import AccountsCard from '@/components/ui/AccountsCard.vue'
import InstanceCreationModal from '@/components/ui/InstanceCreationModal.vue'
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ import {
TrashIcon,
StopCircleIcon,
EyeIcon,
Card,
DropdownSelect,
SearchIcon,
XIcon,
Button,
formatCategoryHeader,
ConfirmModal,
} from '@modrinth/omorphia'
} from '@modrinth/assets'
import { ConfirmModal, Button, Card, DropdownSelect } from '@modrinth/ui'
import { formatCategoryHeader } from '@modrinth/utils'
import ContextMenu from '@/components/ui/ContextMenu.vue'
import dayjs from 'dayjs'
import { useTheming } from '@/store/theme.js'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
ExternalIcon,
EyeIcon,
ChevronRightIcon,
ConfirmModal,
} from '@modrinth/omorphia'
} from '@modrinth/assets'
import { ConfirmModal } from '@modrinth/ui'
import Instance from '@/components/ui/Instance.vue'
import { computed, onMounted, onUnmounted, ref } from 'vue'
import ContextMenu from '@/components/ui/ContextMenu.vue'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
</template>

<script setup>
import { Avatar, Button, Card, PlusIcon, TrashIcon, LogInIcon } from '@modrinth/omorphia'
import { PlusIcon, TrashIcon, LogInIcon } from '@modrinth/assets'
import { Avatar, Button, Card } from '@modrinth/ui'
import { ref, computed, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
import {
users,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
</template>

<script setup>
import { ChevronRightIcon, Button, ChevronLeftIcon } from '@modrinth/omorphia'
import { ChevronRightIcon, ChevronLeftIcon } from '@modrinth/assets'
import { Button } from '@modrinth/ui'
import { useBreadcrumbs } from '@/store/breadcrumbs'
import { useRoute } from 'vue-router'
import { computed } from 'vue'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup>
import { Modal, XIcon, IssuesIcon, LogInIcon } from '@modrinth/omorphia'
import { XIcon, IssuesIcon, LogInIcon } from '@modrinth/assets'
import { Modal } from '@modrinth/ui'
import { ChatIcon } from '@/assets/icons'
import { ref } from 'vue'
import { login as login_flow, set_default_user } from '@/helpers/auth.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup>
import { Button, Checkbox, Modal, XIcon, PlusIcon } from '@modrinth/omorphia'
import { XIcon, PlusIcon } from '@modrinth/assets'
import { Button, Checkbox, Modal } from '@modrinth/ui'
import { PackageIcon, VersionIcon } from '@/assets/icons'
import { ref } from 'vue'
import { export_profile_mrpack, get_pack_export_candidates } from '@/helpers/profile.js'
Expand Down
Loading

0 comments on commit 0f2ddb4

Please sign in to comment.