mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
Use turbo for building and watching concurrently (#5808)
- Add `typecheck` command to all packages. - Use turbo to build and watch concurrently with caches. - Remove root `bin/` folder with last global scripts - `bin/companion.sh` -> `@uppy/companion/start-dev` (`yarn start:companion` still works) - `bin/build-components.mjs` -> `@uppy/components/migrate.mjs` (`yarn migrate:components` can be used to run it). This only needs to be ran for new components, not changing existing ones, so that's why it's not part of the build process. turbo is smart enough to build dependencies within a package first before building the package itself (e.g if wanting to build @uppy/audio, build @uppy/utils first). Unfortunately @uppy/core is a peer dep everywhere turbo does not take it into account, yet it must be build first to avoid race conditions. Therefor I added a turbo.json to each package, which you normally never need, but this is an odd case I suppose. Other solutions ran into cyclic dep errors. Another PR would move over the test commands to turbo too.
This commit is contained in:
parent
455abb32af
commit
271db86ad0
101 changed files with 839 additions and 547 deletions
41
turbo.json
Normal file
41
turbo.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"$schema": "https://turborepo.com/schema.json",
|
||||
"tasks": {
|
||||
"build": {
|
||||
"outputLogs": "new-only",
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": [
|
||||
"src/**/*.{js,ts,jsx,tsx}",
|
||||
"package.json",
|
||||
"tsconfig.json",
|
||||
"tsconfig.build.json"
|
||||
],
|
||||
"outputs": ["lib/**", "dist/**"]
|
||||
},
|
||||
"build:css": {
|
||||
"outputLogs": "new-only",
|
||||
"inputs": ["src/**/*.scss"],
|
||||
"outputs": ["lib/**/*.css", "dist/**/*.css"]
|
||||
},
|
||||
"typecheck": {
|
||||
"outputLogs": "new-only",
|
||||
"dependsOn": ["build"],
|
||||
"inputs": ["src/**/*.{js,ts,jsx,tsx}", "tsconfig.json"]
|
||||
},
|
||||
"uppy#build": {
|
||||
"outputLogs": "new-only",
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": [
|
||||
"src/**/*.{js,ts,jsx,tsx}",
|
||||
"package.json",
|
||||
"bundle.mjs",
|
||||
"build-bundle.mjs"
|
||||
],
|
||||
"outputs": ["lib/**", "dist/**"]
|
||||
},
|
||||
"watch": {
|
||||
"persistent": true,
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue