Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move project to Monorepo (Turborepo) #46

Merged
merged 5 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@ updates:
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/apps/tgvcbot"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/apps/website"
schedule:
interval: "daily"
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '#skip-ts')"
if: "!contains(github.event.head_commit.message, '#skip-lint')"
steps:
- uses: actions/checkout@v2
- name: Setup Node
Expand All @@ -24,11 +24,11 @@ jobs:
run: yarn install

- name: Run Linter
run: yarn lint
run: yarn run lint

build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '#skip-lint')"
if: "!contains(github.event.head_commit.message, '#skip-build')"
steps:
- uses: actions/checkout@v2
- name: Setup Node
Expand All @@ -40,5 +40,5 @@ jobs:
- name: Install dependencies
run: yarn install

- name: TypeScript Build Test
run: yarn test
- name: Build
run: yarn run build
16 changes: 0 additions & 16 deletions .github/workflows/heroku.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
.env
build/
.turbo
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
build
4 changes: 4 additions & 0 deletions apps/tgvcbot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.env
build/
package
*.tgz
2 changes: 2 additions & 0 deletions apps/tgvcbot/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src
.turbo
File renamed without changes.
File renamed without changes.
58 changes: 58 additions & 0 deletions apps/tgvcbot/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "tgvcbot",
"version": "0.2.5",
"description": "Telegram Bot to Play Music in Voice Chat",
"private": true,
"main": "build/app.js",
"scripts": {
"dev": "ts-node src/app.ts",
"test": "tsc --noEmit",
"build": "rimraf build && tsc",
"start": "node build/app.js",
"lint": "eslint . --ext .ts --max-warnings=0",
"fix": "npm run lint -- --fix",
"prepare": "husky install"
},
"author": {
"email": "[email protected]",
"name": "Arnab XD"
},
"workspaces": [
"apps/*"
],
"license": "Apache-2.0",
"devDependencies": {
"@grammyjs/types": "^2.7.0",
"@types/html-escaper": "^3.0.0",
"@types/node": "^15.12.4",
"@types/sharp": "^0.30.2",
"rimraf": "^3.0.2",
"ts-node": "^10.0.0",
"typescript": "^4.6.3"
},
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.9",
"@napi-rs/canvas": "^0.1.21",
"axios": "^0.27.1",
"dotenv": "^16.0.0",
"envalid": "^7.3.1",
"grammy": "^1.8.0",
"html-escaper": "^3.0.3",
"sharp": "^0.30.4",
"tgcalls-next": "^0.0.0-rc.18",
"youtube-sr": "^4.1.17",
"ytdl-core": "^4.11.0"
},
"engines": {
"node": ">=16.x"
},
"lint-staged": {
"src/**/*.ts": [
"eslint --fix",
"prettier --write"
]
},
"resolutions": {
"telegram": "^2.6.9"
}
}
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.
24 changes: 24 additions & 0 deletions apps/website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
15 changes: 15 additions & 0 deletions apps/website/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions apps/website/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/main.js"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions apps/website/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import './style.css';

document.querySelector('#app').innerHTML = `
<h1>Hello Vite!</h1>
<a href="https://vitejs.dev/guide/features.html" target="_blank">Documentation</a>
`;
13 changes: 13 additions & 0 deletions apps/website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "tgvcbot-website",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"vite": "^2.9.5"
}
}
8 changes: 8 additions & 0 deletions apps/website/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
56 changes: 17 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,42 @@
{
"name": "tgvcbot",
"version": "0.2.5",
"name": "tgvcbot-turborepo",
"version": "0.0.0",
"description": "Telegram Bot to Play Music in Voice Chat",
"main": "build/app.js",
"private": true,
"scripts": {
"dev": "ts-node src/app.ts",
"test": "tsc --noEmit",
"build": "rimraf build && tsc",
"start": "node build/app.js",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "eslint . --ext .ts --max-warnings=0",
"fix": "npm run lint -- --fix",
"dev": "turbo run dev --parallel",
"build": "turbo run build",
"format": "prettier --write \"apps/**/*.{ts,js}\"",
"lint": "turbo run lint",
"prepare": "husky install"
},
"author": {
"email": "[email protected]",
"name": "Arnab XD"
},
"workspaces": [
"apps/*"
],
"license": "Apache-2.0",
"devDependencies": {
"@commitlint/config-conventional": "^16.2.1",
"@grammyjs/types": "^2.7.0",
"@types/html-escaper": "^3.0.0",
"@types/node": "^15.12.4",
"@types/sharp": "^0.30.2",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"commitlint": "^16.2.3",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"husky": "^7.0.0",
"lint-staged": "^12.4.0",
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
"ts-node": "^10.0.0",
"typescript": "^4.6.3"
},
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.9",
"@napi-rs/canvas": "^0.1.21",
"axios": "^0.27.1",
"dotenv": "^16.0.0",
"envalid": "^7.3.1",
"grammy": "^1.8.0",
"html-escaper": "^3.0.3",
"sharp": "^0.30.4",
"tgcalls-next": "^0.0.0-rc.18",
"youtube-sr": "^4.1.17",
"ytdl-core": "^4.11.0"
"turbo": "^1.2.5",
"eslint": "^8.14.0",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"eslint-config-prettier": "^8.5.0"
},
"engines": {
"node": ">=16.x"
},
"lint-staged": {
"src/**/*.ts": [
"**/*.ts": [
"eslint --fix",
"prettier --write"
]
},
"resolutions": {
"telegram": "^2.6.9"
}
}
}
15 changes: 15 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"build": {
"dependsOn": [
"^build"
]
},
"lint": {
"outputs": []
},
"dev": {}
}
}
Loading