misc(guide): tweak lerna guides

This commit is contained in:
Victor Savkin 2021-12-22 12:09:54 -05:00 committed by Victor Savkin
parent 57593f5df7
commit 411f467e5c
5 changed files with 190 additions and 0 deletions

View File

@ -1,5 +1,8 @@
# Nx and Yarn/Lerna (Workspaces for Publishing NPM Packages)
> In our teams we see a shift away from Lerna and a strong preference to use Nx for managing JavaScript-based monorepos.
> [Thoughtworks Technology Radar 2021](https://www.thoughtworks.com/en-ca/radar/tools/nx)
Nx has more in common with the build tools used at Google or Facebook (just made a lot more easily accessible for other
companies) than with tools like Yarn Workspaces or Lerna. When using the word "monorepo" in the context of say Google,
we imagine a much richer dev experience, not simply collocating a few projects side-by-side.

View File

@ -1,5 +1,8 @@
# Adding Nx to Lerna/Yarn/PNPM/NPM Workspace
> In our teams we see a shift away from Lerna and a strong preference to use Nx for managing JavaScript-based monorepos.
> [Thoughtworks Technology Radar 2021](https://www.thoughtworks.com/en-ca/radar/tools/nx)
If you have a monorepo that is powered by Lerna, Yarn, PNPM, or NPM, you can transform it into an Nx workspace by
running this command:
@ -140,6 +143,10 @@ import source code analysis. If the path mappings are deduced incorrectly, feel
## Real world examples of using add-nx-to-monorepo
### Speeding Up Facebook React Monorepo with Nx
<iframe width="560" height="315" src="https://www.youtube.com/embed/XLP2RAOwfLQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
### Speeding Up Remotion Monorepo with Nx
<iframe width="560" height="315" src="https://www.youtube.com/embed/TXySu4dZLp0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allow="fullscreen"></iframe>

View File

@ -0,0 +1,60 @@
---
title: '@nrwl/js:node executor'
description: 'Build Node.js applications'
---
# @nrwl/js:node
Build Node.js applications
Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets.
## Options
### buildTarget (_**required**_)
Type: `string`
The target to run to build you the app
### args
Type: `array`
Extra args when starting the app
### host
Default: `localhost`
Type: `string`
The host to inspect the process on
### inspect
Default: `inspect`
Type: `string | boolean `
Ensures the app is starting with debugging
### port
Default: `9229`
Type: `number`
The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes.
### runtimeArgs
Type: `array`
Extra args passed to the node process
### waitUntilTargets
Type: `array`
The targets to run to before starting the node app

View File

@ -0,0 +1,60 @@
---
title: '@nrwl/js:node executor'
description: 'Build Node.js applications'
---
# @nrwl/js:node
Build Node.js applications
Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets.
## Options
### buildTarget (_**required**_)
Type: `string`
The target to run to build you the app
### args
Type: `array`
Extra args when starting the app
### host
Default: `localhost`
Type: `string`
The host to inspect the process on
### inspect
Default: `inspect`
Type: `string | boolean `
Ensures the app is starting with debugging
### port
Default: `9229`
Type: `number`
The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes.
### runtimeArgs
Type: `array`
Extra args passed to the node process
### waitUntilTargets
Type: `array`
The targets to run to before starting the node app

View File

@ -0,0 +1,60 @@
---
title: '@nrwl/js:node executor'
description: 'Build Node.js applications'
---
# @nrwl/js:node
Build Node.js applications
Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets.
## Options
### buildTarget (_**required**_)
Type: `string`
The target to run to build you the app
### args
Type: `array`
Extra args when starting the app
### host
Default: `localhost`
Type: `string`
The host to inspect the process on
### inspect
Default: `inspect`
Type: `string | boolean `
Ensures the app is starting with debugging
### port
Default: `9229`
Type: `number`
The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes.
### runtimeArgs
Type: `array`
Extra args passed to the node process
### waitUntilTargets
Type: `array`
The targets to run to before starting the node app