-
Notifications
You must be signed in to change notification settings - Fork 8
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 #908 from 3YOURMIND/turborepo
dx(build): Cache with Turborepo for Performance
- Loading branch information
Showing
26 changed files
with
307 additions
and
126 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
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 |
---|---|---|
|
@@ -18,10 +18,8 @@ jobs: | |
key: ${{ hashFiles('**/yarn.lock') }} | ||
- name: Install modules | ||
run: yarn install --frozen-lockfile | ||
- name: Build Kotti & its dependencies | ||
run: yarn run build:kotti | ||
- name: Build @3yourmind/documentation | ||
run: yarn workspace @3yourmind/documentation run build | ||
run: yarn run turbo run --filter=@3yourmind/documentation build | ||
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
with: | ||
|
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,7 +1,11 @@ | ||
.nuxt/ | ||
.turbo/ | ||
dist/ | ||
gh-pages/ | ||
node_modules/ | ||
packages/kotti-ui/report.*.html | ||
packages/yoco/fonts/ | ||
*.log | ||
|
||
# vite config gets transpiled in-place for a short moment | ||
vite.config.ts.timestamp* |
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
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 |
---|---|---|
|
@@ -51,7 +51,6 @@ | |
"@typescript-eslint/eslint-plugin": "^6.21.0", | ||
"@typescript-eslint/parser": "^6.21.0", | ||
"@vue/eslint-config-typescript": "^12.0.0", | ||
"concurrently": "^8.2.2", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
|
@@ -73,6 +72,7 @@ | |
"stylelint-config-standard-scss": "^10.0.0", | ||
"stylelint-csstree-validator": "^3.0.0", | ||
"stylelint-prettier": "^4.0.2", | ||
"turbo": "^1.13.2", | ||
"typescript": "^5.3", | ||
"unimported": "1.31.1" | ||
}, | ||
|
@@ -108,21 +108,21 @@ | |
"private": true, | ||
"repository": "[email protected]:3YOURMIND/kotti", | ||
"scripts": { | ||
"build:kotti": "./scripts/build-kotti.sh", | ||
"check": "concurrently \"yarn run check:eslint\" \"yarn run check:prettier\" \"yarn run check:publint\" \"yarn run check:stylelint\"", | ||
"check:eslint": "eslint --max-warnings=0 --ignore-path .gitignore '**/*.{js,json,ts,vue}'", | ||
"check:prettier": "prettier --check --ignore-path .gitignore .", | ||
"check:publint": "lerna run --no-private check:publint", | ||
"check:stylelint": "stylelint 'packages/**/*.{css,scss,vue}'", | ||
"check:unimported": "lerna run check:unimported", | ||
"fix": "yarn run fix:eslint && yarn run fix:stylelint && yarn run fix:prettier", | ||
"fix:eslint": "yarn run check:eslint --fix", | ||
"fix:prettier": "prettier --write --ignore-path .gitignore .", | ||
"fix:stylelint": "yarn run check:stylelint --fix", | ||
"build": "turbo run build", | ||
"check": "turbo run check", | ||
"check:eslint": "turbo run check:eslint", | ||
"check:prettier": "turbo run check:prettier", | ||
"check:publint": "turbo run check:publint", | ||
"check:stylelint": "turbo run check:stylelint", | ||
"check:unimported": "turbo run check:unimported", | ||
"fix": "turbo run fix", | ||
"fix:eslint": "turbo run fix:eslint", | ||
"fix:prettier": "turbo run fix:prettier", | ||
"fix:stylelint": "turbo run fix:stylelint", | ||
"prepare": "husky install", | ||
"prepublishOnly": "yarn run check && lerna run --no-private build", | ||
"test": "yarn --cwd packages/kotti-ui run vitest --typecheck", | ||
"watch": "./scripts/watch.sh" | ||
"prepublishOnly": "turbo run check build", | ||
"test": "turbo run test", | ||
"watch": "nodemon -e js,ts,vue,scss,css,json --watch packages/vue-use-tippy/source --watch packages/yoco/source --exec \"turbo run watch\"" | ||
}, | ||
"version": "1.0.0", | ||
"workspaces": [ | ||
|
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,13 @@ | ||
{ | ||
"entry": [ | ||
"pages/**/*.vue", | ||
"layouts/**/*.vue", | ||
"plugins/**/*.js", | ||
"nuxt.config.ts" | ||
], | ||
"extensions": [".js", ".ts", ".vue"], | ||
"ignorePatterns": ["**/node_modules/**", "**/dist/**"], | ||
"ignoreUnimported": ["shims-*"], | ||
"ignoreUnresolved": [], | ||
"ignoreUnused": ["core-js"] | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"extends": ["//"], | ||
"pipeline": { | ||
"check:publint": { | ||
"dependsOn": [] | ||
}, | ||
"watch": { | ||
"dependsOn": ["^build"] | ||
} | ||
} | ||
} |
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
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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
# this directory is assumed to exist, so create it | ||
mkdir -p dist | ||
|
||
# delete all output files of vue-tsc in dist folder: | ||
## - *.d.ts | ||
find ./dist -type f -name "*.d.ts" -delete | ||
## - *.cts | ||
find ./dist -type f -name "*.cts" -delete | ||
## - empty directories that previously contained the above files | ||
find ./dist -type d -empty -delete | ||
|
||
# generate types | ||
vue-tsc --declaration --emitDeclarationOnly | ||
|
||
# HACK: duplicate index.d.ts in order to calm down publint | ||
cp ./dist/index.d.ts ./dist/index.d.cts |
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,39 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"extends": ["//"], | ||
"pipeline": { | ||
"build": { | ||
"dependsOn": ["^build", "build:vue-tsc", "build:vite", "build:tokens"] | ||
}, | ||
"build:tokens": { | ||
"inputs": ["./tokens/**"], | ||
"outputMode": "new-only", | ||
"outputs": ["./source/kotti-style/tokens.css"] | ||
}, | ||
"build:vite": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["vite.config.ts", "source/**", "tsconfig*.json"], | ||
"outputMode": "new-only", | ||
"outputs": [ | ||
"./dist/kotti-ui.*", | ||
"./dist/variables.scss", | ||
"./dist/style.css" | ||
] | ||
}, | ||
"build:vue-tsc": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["source/**", "tsconfig*.json"], | ||
"outputMode": "new-only", | ||
"outputs": ["./dist/**/*.{cts,d.ts}"] | ||
}, | ||
"test": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["source/**", "tsconfig*.json", "vite.config.ts"], | ||
"outputMode": "new-only", | ||
"outputs": [] | ||
}, | ||
"watch": { | ||
"dependsOn": ["build"] | ||
} | ||
} | ||
} |
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,8 @@ | ||
{ | ||
"entry": ["source/index.ts"], | ||
"extensions": [".ts"], | ||
"ignorePatterns": ["**/node_modules/**", "**/dist/**"], | ||
"ignoreUnimported": [], | ||
"ignoreUnresolved": [], | ||
"ignoreUnused": [] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"extends": ["//"], | ||
"pipeline": { | ||
"build": { | ||
"inputs": ["./scripts/**", "./source/**", "tsconfig.*"], | ||
"outputMode": "new-only", | ||
"outputs": ["./dist/**"] | ||
} | ||
} | ||
} |
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,8 @@ | ||
{ | ||
"entry": ["source/generate.ts", "source/index.ts"], | ||
"extensions": [".ts"], | ||
"ignorePatterns": ["**/node_modules/**", "**/dist/**"], | ||
"ignoreUnimported": [], | ||
"ignoreUnresolved": [["./index.js", ["source/generate.ts"]]], | ||
"ignoreUnused": [] | ||
} |
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
Oops, something went wrong.