Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moltar/projen-turborepo
Projen project type for Turborepo monorepo setup.
https://github.com/moltar/projen-turborepo
monorepo projen turbo turborepo
Last synced: 3 months ago
JSON representation
Projen project type for Turborepo monorepo setup.
- Host: GitHub
- URL: https://github.com/moltar/projen-turborepo
- Owner: moltar
- License: mit
- Created: 2021-12-30T10:48:27.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T09:50:42.000Z (over 2 years ago)
- Last Synced: 2024-04-26T10:20:59.091Z (6 months ago)
- Topics: monorepo, projen, turbo, turborepo
- Language: TypeScript
- Homepage: https://npm.im/projen-turborepo
- Size: 448 KB
- Stars: 26
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-repos - moltar/projen-turborepo - Projen project type for Turborepo monorepo setup. (TypeScript)
README
# ๐ฆ `projen-turborepo`
> [Projen](https://github.com/projen/projen) project type for [Turborepo](https://turborepo.org/) [monorepo](https://en.wikipedia.org/wiki/Monorepo) setup.
## Getting Started
To create a new project, run the following command and follow the instructions:
```sh
$> mkdir my-monorepo
$> cd my-monorepo
$> npx projen new --from projen-turborepo --projenrc-ts
๐ค Synthesizing project...
...
```## Demo
See [`projen-turborepo-test`](https://github.com/moltar/projen-turborepo-test) GitHub repo for
a demo project.## Example
```ts
import { TurborepoProject } from 'projen-turborepo'
import { typescript } from 'projen';const turbo = new TurborepoProject({
name: 'my-monorepo',
turbo: {
pipeline: {
// ... your pipeline config, but defaults are already included
},
},// this will probably all be true by default in the future, but for now all of these
// are experimental and need to be explicitly turned on.
pathMapping: true,
jestModuleNameMapper: true,
projectReferences: true,
parallelWorkflows: true,
vscodeMultiRootWorkspaces: true,
})new typescript.TypeScriptProject({
parent: turbo,
defaultReleaseBranch: 'master',
name: 'my-first-project',
outdir: 'packages/my-first-project',
// ...
})turbo.synth()
```Then use `turbo` to run the tasks:
```plain
$> turbo run test
โข Packages in scope: my-first-project
โข Running test in 1 packages
my-first-project:test: cache hit, replaying output 2264dbd676fac83e
my-first-project:test: yarn run v1.22.11
my-first-project:test: $ npx projen test
my-first-project:test: ----------|---------|----------|---------|---------|-------------------
my-first-project:test: File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
my-first-project:test: ----------|---------|----------|---------|---------|-------------------
my-first-project:test: All files | 100 | 100 | 100 | 100 |
my-first-project:test: index.ts | 100 | 100 | 100 | 100 |
my-first-project:test: ----------|---------|----------|---------|---------|-------------------
my-first-project:test: Done in 4.29s.
my-first-project:test: ๐พ test | jest --passWithNoTests --all --updateSnapshot
my-first-project:test: PASS test/hello.test.ts
my-first-project:test: โ hello (1 ms)
my-first-project:test:
my-first-project:test: Test Suites: 1 passed, 1 total
my-first-project:test: Tests: 1 passed, 1 total
my-first-project:test: Snapshots: 0 total
my-first-project:test: Time: 1.148 s, estimated 2 s
my-first-project:test: Ran all test suites.
my-first-project:test: ๐พ test ยป eslint | eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools .projenrc.jsTasks: 1 successful, 1 total
Cached: 1 cached, 1 total
Time: 65ms >>> FULL TURBO
```