Compare commits

..

14 Commits

Author SHA1 Message Date
Jason Jean 507efc3d5d Release 9.2.3 2020-04-20 16:13:41 -04:00
Jason Jean 2fc5ce270a fix(core): rework where tmp tsconfigs are generated (#2805) 2020-04-16 14:42:18 -04:00
Jack Hsu 1f59ce4c9c fix(react): add styled-components babel plugin only if it will not conflict with emotion (#2863)
Closes #2845
2020-04-16 14:42:18 -04:00
Isaac Mann b6b981b5ce docs(docs): add CI section for React (#2862)
Co-authored-by: Isaac Mann <isaacplmann+git@gmail.com>
2020-04-16 14:42:17 -04:00
Juri Strumpflohner aea4620472 docs: add link to nxcloud when generating a new react/angular a… (#2819)
* docs(angular): add link to nxcloud in generated app

* docs(react): add link to nxcloud in generated app
2020-04-16 14:42:17 -04:00
Nathan Walker d0700200ad fix(core): file-utils workspaceFileName now returns proper file… (#2811)
closes https://github.com/nrwl/nx/issues/2253
2020-04-16 14:42:17 -04:00
Jonathan Cammisuli 6b9424b544 chore(core): format plugins.json file (#2841) 2020-04-16 14:42:17 -04:00
Gustavo Perdomo 58827d3f19 chore(core): nx plugin submission [@gperdomor/nx-docker] (#2801)
Co-authored-by: Jonathan Cammisuli <jon@cammisuli.ca>
2020-04-16 14:42:17 -04:00
Brandon 40fa8f1904 fix(angular): remove prod tsconfig for non-publishable lib (#2816)
Closes #2765
2020-04-16 14:42:17 -04:00
Isaac Mann 0b003b5136 docs(docs): add the workspace section for nx.dev (#2832)
* docs(docs): add the workspace section for nx.dev

* Update docs/map.json

Co-Authored-By: Brandon <robertsbt@gmail.com>

Co-authored-by: Isaac Mann <isaacplmann+git@gmail.com>
Co-authored-by: Brandon <robertsbt@gmail.com>
2020-04-16 14:42:17 -04:00
Juri Strumpflohner c093f70650 chore(core): fix react tsconfig (#2826) 2020-04-16 14:42:17 -04:00
Juri Strumpflohner a4d392e121 fix(core): adjust nx migrate log (#2814) 2020-04-16 14:42:16 -04:00
Fabian Gosebrink d2ceaac529 chore(core): nx plugin submission @offeringsolutions/nx-protractor-to-cypress 2020-04-16 14:42:16 -04:00
Jonathan Cammisuli 50aa3e1c09 fix(testing): correct spelling of jest-preset-angular for migrations (#2818) 2020-04-16 14:42:16 -04:00
8259 changed files with 381545 additions and 994572 deletions
-12
View File
@@ -1,12 +0,0 @@
[build]
target-dir = 'build/target'
[target.x86_64-unknown-linux-musl]
rustflags = [
"-C",
"target-feature=-crt-static",
]
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
rustflags = ["-C", "target-feature=-crt-static"]
+170 -153
View File
@@ -1,174 +1,191 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1
# -------------------------
# ORBS
# -------------------------
orbs:
nx: nrwl/nx@1.6.2
rust: circleci/rust@1.6.0
browser-tools: circleci/browser-tools@1.4.8
# -------------------------
# EXECUTORS
# -------------------------
defaults: &defaults
working_directory: ~/repo
executors:
linux:
<<: *defaults
default:
working_directory: ~/repo
environment:
# install Cypress in Linux-like cache folder
CYPRESS_CACHE_FOLDER: "~/.cache/Cypress"
docker:
- image: cimg/rust:1.73.0-browsers
resource_class: medium+
- image: circleci/node:12-browsers
macos:
<<: *defaults
resource_class: macos.m1.medium.gen1
macos:
xcode: '14.2.0'
# -------------------------
# COMMANDS
# -------------------------
commands:
run-pnpm-install:
parameters:
os:
type: string
install_rsync:
description: 'Install Rsync'
steps:
- run: sudo apt install rsync
yarn_install:
description: 'Install Dependencies'
steps:
- run: yarn install --frozen-lockfile --non-interactive
- run: ./node_modules/.bin/cypress verify
- save_cache:
key: nrwl-nx-node12-yarn-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- save_cache:
key: nrwl-nx-node12-cypress-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/Cypress
restore_cypress_cache:
description: 'Restore Cypress Cache'
steps:
- restore_cache:
name: Restore pnpm Package Cache
keys:
- node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }}
- when:
condition:
equal: [<< parameters.os >>, linux]
steps:
- run:
name: Install pnpm package manager (linux)
command: |
npm install --prefix=$HOME/.local -g @pnpm/exe@8
- when:
condition:
equal: [<< parameters.os >>, macos]
steps:
- run:
name: Install pnpm package manager (macos)
command: |
npm install -g @pnpm/exe@8
- run:
name: Install Dependencies
command: |
pnpm install --frozen-lockfile
pnpm playwright install --with-deps
- save_cache:
name: Save pnpm Package Cache
key: node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }}
paths:
- ~/.pnpm-store
- ~/.cache/Cypress
- node_modules
# -------------------------
# JOBS
# -------------------------
jobs:
# -------------------------
# JOBS: Main Linux
# -------------------------
main-linux:
executor: linux
environment:
NX_E2E_CI_CACHE_KEY: e2e-circleci-linux
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
NX_NATIVE_LOGGING: 'false'
NX_E2E_RUN_E2E: 'true'
NX_CI_EXECUTION_ENV: 'linux'
NX_CLOUD_DTE_V2: 'true'
- nrwl-nx-node12-cypress-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- nrwl-nx-node12-cypress-
restore_yarn_cache:
description: 'Restore Cached Dependencies'
steps:
- restore_cache:
keys:
- nrwl-nx-node12-yarn-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- nrwl-nx-node12-yarn-
setup:
description: 'Setup Executor'
steps:
- checkout
- nx/set-shas:
main-branch-name: 'master'
- run: npx nx-cloud@next start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e"
- install_rsync
- attach_workspace:
# Must be absolute path or relative path from working_directory
at: ..
jobs:
install:
executor: default
steps:
- checkout
- restore_yarn_cache
- restore_cypress_cache
- yarn_install
- persist_to_workspace:
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
# taken to be the root directory of the workspace.
root: ..
# Must be relative path from root
paths:
- repo/node_modules
- .cache/Cypress
checks-and-unit-tests:
executor: default
steps:
- setup
- run:
command: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- browser-tools/install-chrome
- run-pnpm-install:
os: linux
name: Check Formatting
command: yarn checkformat
- run:
name: Check Commit Message Format
command: yarn checkcommit
- run:
name: Check Imports
command: yarn checkimports
- run:
name: Check Documentation
command: pnpm nx documentation --no-dte
no_output_timeout: 20m
command: yarn documentation
- run:
name: Run Checks/Lint/Test/Build
no_output_timeout: 60m
command: |
pids=()
pnpm nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD &
pids+=($!)
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte &
pids+=($!)
(pnpm nx affected --targets=lint,test,build --base=$NX_BASE --head=$NX_HEAD --parallel=3 &&
pnpm nx affected --targets=e2e,e2e-ci --base=$NX_BASE --head=$NX_HEAD --parallel=1) &
pids+=($!)
for pid in "${pids[@]}"; do
wait "$pid"
done
# -------------------------
# JOBS: Main-MacOS
# -------------------------
mainmacos:
executor: macos
environment:
NX_E2E_CI_CACHE_KEY: e2e-circleci-macos
NX_PERF_LOGGING: 'false'
NX_CI_EXECUTION_ENV: 'macos'
SELECTED_PM: 'npm' # explicitly define npm for macOS tests
name: Run Unit Tests
command: yarn test:all
e2e-nx-1:
executor: default
steps:
- checkout
- restore_cache:
name: Restore Homebrew packages
keys:
- nrwl-nx-homebrew-packages
- setup
- run:
name: Configure Detox Environment, Install applesimutils
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
xcrun simctl shutdown all && xcrun simctl erase all
no_output_timeout: 20m
- save_cache:
name: Save Homebrew Cache
key: nrwl-nx-homebrew-packages
paths:
- /usr/local/Homebrew
- ~/Library/Caches/Homebrew
- run-pnpm-install:
os: macos
- rust/install
- nx/set-shas:
main-branch-name: 'master'
name: Nx CLI E2E Tests Part 1
command: yarn e2e-ci1 nx
no_output_timeout: 30m
e2e-nx-2:
executor: default
steps:
- setup
- run:
name: Run E2E Tests for macOS
command: |
pnpm nx affected -t e2e-macos-ci --parallel=1 --base=$NX_BASE --head=$NX_HEAD
no_output_timeout: 45m
name: Nx CLI E2E Tests Part 2
command: yarn e2e-ci2 nx
no_output_timeout: 30m
e2e-nx-3:
executor: default
steps:
- setup
- run:
name: Nx CLI E2E Tests Part 3
command: yarn e2e-ci3 nx
no_output_timeout: 30m
e2e-nx-4:
executor: default
steps:
- setup
- run:
name: Nx CLI E2E Tests Part 4
command: yarn e2e-ci4 nx
no_output_timeout: 30m
e2e-ng-1:
executor: default
steps:
- setup
- run:
name: Angular CLI E2E Tests Part 1
command: yarn e2e-ci1 angular
no_output_timeout: 30m
e2e-ng-2:
executor: default
steps:
- setup
- run:
name: Angular CLI E2E Tests Part 2
command: yarn e2e-ci2 angular
no_output_timeout: 30m
e2e-ng-3:
executor: default
steps:
- setup
- run:
name: Angular CLI E2E Tests Part 3
command: yarn e2e-ci3 angular
no_output_timeout: 30m
e2e-ng-4:
executor: default
steps:
- setup
- run:
name: Angular CLI E2E Tests Part 4
command: yarn e2e-ci4 angular
no_output_timeout: 30m
# -------------------------
# WORKFLOWS(JOBS)
# -------------------------
workflows:
version: 2
build:
version: 2.1
default_workflow:
jobs:
- main-linux
- mainmacos:
name: main-macos-e2e
- install
- checks-and-unit-tests:
requires:
- install
- e2e-nx-1:
requires:
- install
- e2e-nx-2:
requires:
- install
- e2e-nx-3:
requires:
- install
- e2e-nx-4:
requires:
- install
- e2e-ng-1:
requires:
- install
- e2e-ng-2:
requires:
- install
- e2e-ng-3:
requires:
- install
- e2e-ng-4:
requires:
- install
+82
View File
@@ -0,0 +1,82 @@
module.exports = {
types: [
{ value: 'feat', name: 'feat: A new feature' },
{ value: 'fix', name: 'fix: A bug fix' },
{ value: 'docs', name: 'docs: Documentation only changes' },
{
value: 'cleanup',
name:
'cleanup: A code change that neither fixes a bug nor adds a feature'
},
{
value: 'chore',
name: "chore: Other changes that don't modify src or test files"
}
],
scopes: [
{ name: 'angular', description: 'anything Angular specific' },
{ name: 'bazel', description: 'anything Bazel specific' },
{ name: 'core', description: 'anything Nx core specific' },
{ name: 'docs', description: 'anything related to docs infrastructure' },
{ name: 'nextjs', description: 'anything Next specific' },
{ name: 'nest', description: 'anything Nest specific' },
{ name: 'node', description: 'anything Node specific' },
{ name: 'nx-plugin', description: 'anything Nx Plugin specific' },
{ name: 'react', description: 'anything React specific' },
{ name: 'linter', description: 'anything Linter specific' },
{ name: 'storybook', description: 'anything Storybook specific' },
{
name: 'testing',
description: 'anything testing specific (e.g., jest or cypress)'
},
{
name: 'repo',
description: 'anything related to managing the repo itself'
},
{ name: 'misc', description: 'misc stuff' }
],
allowTicketNumber: true,
isTicketNumberRequired: false,
ticketNumberPrefix: 'TICKET-',
ticketNumberRegExp: '\\d{1,5}',
// it needs to match the value for field type. Eg.: 'fix'
/*
scopeOverrides: {
fix: [
{name: 'merge'},
{name: 'style'},
{name: 'e2eTest'},
{name: 'unitTest'}
]
},
*/
// override the messages, defaults are as follows
messages: {
type: "Select the type of change that you're committing:",
scope: '\nDenote the SCOPE of this change (optional):',
// used if allowCustomScopes is true
customScope: 'Denote the SCOPE of this change:',
subject:
'Write a SHORT, IMPERATIVE (lowercase) description of the change:\n',
body:
'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
breaking: 'List any BREAKING CHANGES (optional):\n',
footer:
'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
confirmCommit: 'Are you sure you want to proceed with the commit above?'
},
allowCustomScopes: false,
allowBreakingChanges: ['feat', 'fix'],
// skip any questions you want
skipQuestions: ['ticketNumber'],
// limit subject length
subjectLimit: 100
// breaklineChar: '|', // It is supported for fields body and footer.
// footerPrefix : 'ISSUES CLOSED:'
// askForBreakingChangeFirst : true, // default is false
};
-7
View File
@@ -1,7 +0,0 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:20-bullseye
# Update the underlying (Debian) OS, to make sure we have the latest security patches and libraries like 'GLIBC'
RUN sudo apt-get update && sudo apt-get -y upgrade
# Update pnpm
RUN npm install -g pnpm@8.15.7
-33
View File
@@ -1,33 +0,0 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "NxDevContainer",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// 4211 = nx graph port
"forwardPorts": [4211],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"nrwl.angular-console",
"firsttris.vscode-jest-runner",
"eamodio.gitlens"
],
"settings": {
"debug.javascript.autoAttachFilter": "onlyWithFlag" // workaround for that issue: https://github.com/microsoft/vscode-js-debug/issues/374#issuecomment-622239998
}
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
-5
View File
@@ -1,5 +0,0 @@
#!/bin/sh
# Install dependencies
pnpm install --frozen-lockfile
-18
View File
@@ -1,18 +0,0 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# 4 space indentation
[*.{js,ts,jsx,tsx}]
indent_style = space
indent_size = 2
[package.json]
indent_style = space
indent_size = 2
-1
View File
@@ -1 +0,0 @@
NX_ISOLATE_PLUGINS=true
-1
View File
@@ -1 +0,0 @@
node_modules
-68
View File
@@ -1,68 +0,0 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"node": true
},
"ignorePatterns": ["**/*.ts"],
"plugins": ["@typescript-eslint", "@nx"],
"extends": ["plugin:storybook/recommended"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-restricted-imports": ["error", "create-nx-workspace"],
"@typescript-eslint/no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["nx/src/plugins/js*"],
"message": "Imports from 'nx/src/plugins/js' are not allowed. Use '@nx/js' instead"
},
{
"group": ["**/native-bindings", "**/native-bindings.js", ""],
"message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
}
]
}
],
"storybook/no-uninstalled-addons": [
"error",
{
"ignore": ["@nx/react/plugins/storybook"],
"packageJsonLocation": "../../package.json"
}
]
},
"overrides": [
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["**/executors/**/schema.json", "**/generators/**/schema.json"],
"rules": {
"@nx/workspace/valid-schema-description": "error"
}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"checkDynamicDependenciesExceptions": [".*"],
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
}
]
}
+51
View File
@@ -0,0 +1,51 @@
_[Please make sure you have read the submission guidelines before posting an issue](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-issue)_
# Prerequisites
Please answer the following questions for yourself before submitting an issue.
**YOU MAY DELETE THE PREREQUISITES SECTION.**
- [ ] I am running the latest version
- [ ] I checked the documentation (nx.dev) and found no answer
- [ ] I checked to make sure that this issue has not already been filed
- [ ] I'm reporting the issue to the correct repository (not related to React, Angular or any dependency)
## Expected Behavior
Please describe the behavior you are expecting
## Current Behavior
What is the current behavior?
## Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
### Steps to Reproduce
Please provide detailed steps for reproducing the issue.
1. step 1
2. step 2
3. ...
If you can provide steps to reproduce from scratch, that would be enormously appreciated (i.e. where the first step is `npx create-nx-workspace@latest repro-workspace`)
### Context
Please provide any relevant information about your setup:
- version of Nx used (_Please run `nx report` at the root of your workspace and copy the results here if you are using Nx 8.6.1 or greater_)
- 3rd-party libraries and their versions
- and most importantly - a use-case that fails
**A minimal reproduction scenario allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.**
### Failure Logs
Please include any relevant log snippets or files here.
## Other
Any other relevant information that will help us help you.
-82
View File
@@ -1,82 +0,0 @@
name: 🐞 Bug Report
description: This form is to report unexpected behavior in Nx.
labels: ["type: bug"]
body:
- type: markdown
attributes:
value: |
Thank you for taking your precious time to file an issue! 🙏 We are sorry for the inconvenience this issue has caused you and want to resolve it as soon as possible.
Help us help you! We know that your time is precious and hate to ask for any more of it, but the first step in fixing this issue is to understand the issue. Taking some extra time to ensure that we are able to reproduce the issue will help us significantly in resolving the issue.
- type: textarea
id: current-behavior
attributes:
label: Current Behavior
description: What is the behavior that currently you experience?
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: What is the behavior that you expect to happen?
validations:
required: true
- type: input
id: repo
attributes:
label: GitHub Repo
description: |
This is extremely important! If this issue is reproduce-able on https://github.com/nrwl/nx-examples, you may use that as the repo.
If not, please do take a few minutes of your time to create a repo to help us reproduce the issue.
This is the best way to help us reproduce the issue and fix it as soon as possible.
- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Please provide some instructions to reproduce the issue in the repo provided above. Be as detailed as possible.
value: |
1.
validations:
required: true
- type: textarea
id: nx-report
attributes:
label: Nx Report
description: Please paste the contents shown by `nx report`. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: logs
attributes:
label: Failure Logs
description: Please include any relevant log snippets or files here. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: input
id: pm
attributes:
label: Package Manager Version
description: |
If `nx report` doesn't work, please provide the name and the version of your package manager.
You can get version information by running `yarn --version`, `pnpm --version` or `npm --version`, depending on the package manager used.
- type: checkboxes
id: os
attributes:
label: Operating System
description: What Operating System are you using?
options:
- label: macOS
- label: Linux
- label: Windows
- label: Other (Please specify)
- type: textarea
id: additional
attributes:
label: Additional Information
description: Is there any additional information that you can provide?
- type: markdown
id: disclaimer
attributes:
value: |
> If we are not able to reproduce the issue, we will likely prioritize fixing other issues we can reproduce. Please do your best to fill out all of the sections above.
-26
View File
@@ -1,26 +0,0 @@
---
name: "📖 Documentation issue"
about: Help improve our docs.
labels: "type: docs"
---
### Documentation issue
<!-- (Update "[ ]" to "[x]" to check a box) -->
- [ ] Reporting a typo
- [ ] Reporting a documentation bug
- [ ] Documentation improvement
- [ ] Documentation feedback
<!--
If your issue is not regarding the documentation, please choose an issue type:
https://github.com/nrwl/nx/issues/new/choose
-->
### Is there a specific documentation page you are reporting?
Enter the URL or documentation section here.
### Additional context or description
Provide any additional details here as needed.
-17
View File
@@ -1,17 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: "\U0001F680 Feature Request"
about: "Suggest a new feature to make Nx better"
url: https://github.com/nrwl/nx/discussions/new?category=feature-requests
- name: Start a Discussion
about: "Start a discussion to share your experience with Nx"
url: https://github.com/nrwl/nx/discussions/new/choose
- name: Join the Discord
url: https://go.nx.dev/community
about: "The Nx Official Discord Server is a great place for questions to be asked and answered. Please use the #forum if you need help with your workspace!"
- name: Are you looking for integration with a new tool?
url: https://nx.dev/community
about: "There are a lot of awesome Plugins for Nx provided by the community! Check here to see if there is a community plugin to integrate your tool."
- name: Read the community guidelines
about: "Please make sure you have read the submission guidelines before posting an issue"
url: https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-an-issue
+12
View File
@@ -0,0 +1,12 @@
## Description
Description the change you would like to have.
## Suggested implementation
How do you think it can be done?
## Describe alternatives
Do you have considered any alternative?
Teachability, Documentation, Adoption, Migration Strategy...
+6 -13
View File
@@ -1,18 +1,11 @@
<!-- Please make sure you have read the submission guidelines before posting an PR -->
<!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr -->
_[Please make sure you have read the submission guidelines before posting an PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr)_
<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->
> _Please make sure that your commit message follows our format._
<!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. -->
> Example: `fix(nx): must begin with lowercase`
## Current Behavior
<!-- This is the behavior we have today -->
## Current Behavior (This is the behavior we have today, before the PR is merged)
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR -->
## Expected Behavior (This is the new behavior we can expect after the PR is merged)
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is merged. -->
Fixes #
## Issue
@@ -1,31 +1,9 @@
<!--
_[Please make sure you have read the submission guidelines before posting an PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr)_
# Community Plugin Submission
Thanks for submitting your Nx Plugin to our community plugins list. Make sure to follow these steps to ensure that your PR is approved in a timely manner.
## Plugin Requirements
Before you submit your plugin to be listed in our registry, it needs to meet the following requirements:
- Run some kind of automated e2e tests in your repository
- Include `@nx/devkit` as a `dependency` in the plugin's `package.json`
- List a `repository.url` in the plugin's `package.json`
i.e.
```
{
"repository": {
"type": "git",
"url": "https://github.com/nrwl/nx.git",
"directory": "packages/web"
}
}
```
Note: We reserve the right to remove unmaintained plugins from the registry. If the plugins become maintained again, they can be resubmitted to the registry.
## Steps to Submit Your Plugin
- Use the following commit message template: `chore(core): nx plugin submission [PLUGIN_NAME]`
- Update the `community/approved-plugins.json` file with a new entry for your plugin that includes `name`, `url`, `description`:
@@ -42,15 +20,4 @@ Example:
}]
```
Once merged, your plugin will be available when running the `nx list` command, and will also be available in the Plugin Registry on [nx.dev](https://nx.dev/plugin-registry)
-->
# Community Plugin Submission
## {replace with plugin's name}
<!--
Describe what your plugin is and what is its goal or issues it addresses. If you don't provide a description, we will not merge your PR.
Is it focused on a technology, tooling or behaviour? Does the plugin provide generators, executors or graph support?
Do you know who is already using the plugin? Mention who is the author of the plugin.
-->
Once merged, your will plugin will be available when running the `nx list` command, and will also be available in the Plugin browser on [nx.dev](https://nx.dev)
@@ -0,0 +1,11 @@
_[Please make sure you have read the submission guidelines before posting an PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr)_
> _Please make sure that your commit message follows our format._
> Example: `fix(nx): must begin with lowercase`
## Current Behavior (This is the behavior we have today, before the PR is merged)
## Expected Behavior (This is the new behavior we can expect after the PR is merged)
## Issue
-21
View File
@@ -1,21 +0,0 @@
name: Unmergeable Labels Check
on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
jobs:
do-not-merge:
if: ${{ github.repository_owner == 'nrwl' }}
name: Prevent Merging
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "${{ toJSON(github.event.*.labels.*.name) }}"
node -e 'const forbidden = ["target: next major version", "pr status: needs tests", "pr status: in-progress", "blocked: needs rebase", "pr status: do not merge"];
const match = ${{ toJSON(github.event.*.labels.*.name) }}.find(l => forbidden.includes(l.toLowerCase()));
if (match) {
console.log("Cannot merge PRs that are labeled with " + match);
process.exit(1)
}'
-626
View File
@@ -1,626 +0,0 @@
name: E2E matrix
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
env:
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
permissions: { }
jobs:
preinstall:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
node_version:
- 20
- 18
exclude:
# run just node v20 on macos
- os: macos-latest
node_version: 18
name: Cache install (${{ matrix.os }}, node v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PNPM
run: |
npm install -g @pnpm/exe@8
- name: Set node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
with:
lookup-only: true
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Ensure Python setuptools Installed on Macos
if: ${{ matrix.os == 'macos-latest' }}
id: brew-install-python-setuptools
run: brew install python-setuptools
- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Homebrew cache directory path
if: ${{ matrix.os == 'macos-latest' }}
id: homebrew-cache-dir-path
run: echo "dir=$(brew --cache)" >> $GITHUB_OUTPUT
- name: Cache Homebrew
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/cache@v3
with:
lookup-only: true
path: ${{ steps.homebrew-cache-dir-path.outputs.dir }}
key: brew-${{ matrix.node_version }}
restore-keys: |
brew-
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v3
with:
lookup-only: true
path: '${{ github.workspace }}/.cypress'
key: ${{ runner.os }}-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
e2e:
if: ${{ github.repository_owner == 'nrwl' }}
needs: preinstall
permissions:
contents: read
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
node_version:
- 20
- 18
package_manager:
- npm
- yarn
- pnpm
project:
- e2e-angular
- e2e-cypress
- e2e-detox
- e2e-esbuild
- e2e-eslint
- e2e-expo
- e2e-gradle
- e2e-jest
- e2e-js
- e2e-lerna-smoke-tests
- e2e-next
- e2e-node
- e2e-nuxt
- e2e-nx-init
- e2e-nx
- e2e-playwright
- e2e-plugin
- e2e-react
- e2e-react-native
- e2e-release
- e2e-remix
- e2e-rollup
- e2e-storybook
- e2e-vite
- e2e-vue
- e2e-web
- e2e-webpack
- e2e-workspace-create
include:
# os short names
- os: ubuntu-latest
os_name: 'Linux'
- os: macos-latest
os_name: 'MacOS'
# test timeouts
- os: ubuntu-latest
os_timeout: 60
- os: macos-latest
os_timeout: 90
# codeowner groups
- project: e2e-angular
codeowners: 'S04SS457V38'
- project: e2e-cypress
codeowners: 'S04T16BTJJY'
- project: e2e-detox
codeowners: 'S04TNCNJG5N'
- project: e2e-esbuild
codeowners: 'S04SJ6HHP0X'
- project: e2e-expo
codeowners: 'S04TNCNJG5N'
- project: e2e-gradle
codeowners: 'S04TNCNJG5N'
- project: e2e-jest
codeowners: 'S04T16BTJJY'
- project: e2e-js
codeowners: 'S04SJ6HHP0X'
- project: e2e-lerna-smoke-tests
codeowners: 'S04TNCVEETS'
- project: e2e-eslint
codeowners: 'S04SYJGKSCT'
- project: e2e-next
codeowners: 'S04TNCNJG5N'
- project: e2e-node
codeowners: 'S04SJ6HHP0X'
- project: e2e-nx-init
codeowners: 'S04SYHYKGNP'
- project: e2e-nx
codeowners: 'S04SYHYKGNP'
- project: e2e-plugin
codeowners: 'S04SYHYKGNP'
- project: e2e-release
codeowners: 'S04SYHYKGNP'
- project: e2e-react
codeowners: 'S04TNCNJG5N'
- project: e2e-react-native
codeowners: 'S04TNCNJG5N'
- project: e2e-web
codeowners: 'S04SJ6PL98X'
- project: e2e-rollup
codeowners: 'S04SJ6PL98X'
- project: e2e-storybook
codeowners: 'S04SVQ8H0G5'
- project: e2e-playwright
codeowners: 'S04SVQ8H0G5'
- project: e2e-remix
codeowners: 'S04SVQ8H0G5'
- project: e2e-vite
codeowners: 'S04SJ6PL98X'
- project: e2e-vue
codeowners: 'S04SJ6PL98X'
- project: e2e-nuxt
codeowners: 'S04SJ6PL98X'
- project: e2e-webpack
codeowners: 'S04SJ6PL98X'
- project: e2e-workspace-create
codeowners: 'S04SYHYKGNP'
exclude:
# exclude react-native tests from ubuntu
- os: ubuntu-latest
project: e2e-react-native
- os: ubuntu-latest
project: e2e-detox
- os: ubuntu-latest
project: e2e-expo
# exclude non-CNW/Lerna tests from non-LTS node versions
- node_version: 18
project: e2e-angular
- node_version: 18
project: e2e-cypress
- node_version: 18
project: e2e-detox
- node_version: 18
project: e2e-esbuild
- node_version: 18
project: e2e-expo
- node_version: 18
project: e2e-gradle
- node_version: 18
project: e2e-jest
- node_version: 18
project: e2e-js
- node_version: 18
project: e2e-eslint
- node_version: 18
project: e2e-next
- node_version: 18
project: e2e-node
- node_version: 18
project: e2e-nuxt
- node_version: 18
project: e2e-nx-init
- node_version: 18
project: e2e-nx
- node_version: 18
project: e2e-plugin
- node_version: 18
project: e2e-playwright
- node_version: 18
project: e2e-react
- node_version: 18
project: e2e-react-native
- node_version: 18
project: e2e-web
- node_version: 18
project: e2e-remix
- node_version: 18
project: e2e-rollup
- node_version: 18
project: e2e-storybook
- node_version: 18
project: e2e-vite
- node_version: 18
project: e2e-vue
- node_version: 18
project: e2e-webpack
# run just npm v20 on macos
- os: macos-latest
package_manager: yarn
- os: macos-latest
package_manager: pnpm
- os: macos-latest
node_version: 18
fail-fast: false
name: ${{ matrix.os_name }}/${{ matrix.package_manager }}/${{ matrix.node_version }} ${{ join(matrix.project) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare dir for output
run: mkdir -p outputs
- name: Install PNPM
run: |
npm install -g @pnpm/exe@8
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Install packages
run: pnpm install --frozen-lockfile
- name: Cleanup
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get install lsof
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Homebrew cache directory path
if: ${{ matrix.os == 'macos-latest' }}
id: homebrew-cache-dir-path
run: echo "dir=$(brew --cache)" >> $GITHUB_OUTPUT
- name: Cache Homebrew
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/cache@v3
with:
path: ${{ steps.homebrew-cache-dir-path.outputs.dir }}
key: brew-${{ matrix.node_version }}
restore-keys: |
brew-
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v3
with:
path: '${{ github.workspace }}/.cypress'
key: ${{ runner.os }}-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
- name: Install applesimutils, reset ios simulators
if: ${{ matrix.os == 'macos-latest' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
xcrun simctl shutdown all && xcrun simctl erase all
- name: Configure git metadata (needed for lerna smoke tests)
run: |
git config --global user.email test@test.com
git config --global user.name "Test Test"
- name: Set starting timestamp
id: before-e2e
run: |
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
- name: Run e2e tests
id: e2e-run
run: pnpm nx run-many -t e2e-local -p ${{ matrix.project }}
timeout-minutes: ${{ matrix.os_timeout }}
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: test@test.com
GIT_COMMITTER_NAME: Test
NX_E2E_CI_CACHE_KEY: e2e-gha-${{ matrix.os }}-${{ matrix.node_version }}-${{ matrix.package_manager }}
NODE_OPTIONS: --max_old_space_size=8192
SELECTED_PM: ${{ matrix.package_manager }}
npm_config_registry: http://localhost:4872
YARN_REGISTRY: http://localhost:4872
NX_CACHE_DIRECTORY: 'tmp'
NX_E2E_SKIP_CLEANUP: 'true'
NX_E2E_RUN_E2E: 'true'
NX_E2E_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
NX_DAEMON: 'true'
NX_SKIP_LOG_GROUPING: 'true'
- name: Save matrix config in file
if: ${{ always() }}
id: save-matrix
shell: bash
run: |
before=${{ steps.before-e2e.outputs.timestamp }}
now=$(date +%s)
delta=$(($now - $before))
matrix=$((
echo '${{ toJSON(matrix) }}'
) | jq --argjson delta $delta -c '. + { "status": "${{ steps.e2e-run.outcome}}", "duration": $delta }')
echo "$matrix" > matrix
path=outputs/${{ matrix.os_name}}-${{ matrix.node_version}}-${{ matrix.package_manager}}-${{ matrix.project }}
echo "path=$path" >> $GITHUB_OUTPUT
echo "$matrix" > $path
- name: Upload matrix config
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: outputs
path: ${{ steps.save-matrix.outputs.path }}
- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled && failure() }}
uses: mxschmitt/action-tmate@v3.8
timeout-minutes: 15
process-result:
if: ${{ always() && github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
needs: e2e
outputs:
message: ${{ steps.process-json.outputs.SLACK_MESSAGE }}
proj-duration: ${{ steps.process-json.outputs.SLACK_PROJ_DURATION }}
pm-duration: ${{ steps.process-json.outputs.SLACK_PM_DURATION }}
codeowners: ${{ steps.process-json.outputs.CODEOWNERS }}
steps:
- name: Load outputs
uses: actions/download-artifact@v3
with:
name: outputs
path: outputs
- name: Join and stringify matrix configs
id: combine-json
run: |
combined=$((jq -s . outputs/*) | jq tostring)
echo "combined=$combined" >> $GITHUB_OUTPUT
- name: Make slack outputs
id: process-json
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ github.token }}
with:
script: |
const combined = JSON.parse(${{ steps.combine-json.outputs.combined }});
const failedProjects = combined.filter(c => c.status === 'failure').sort((a, b) => a.project.localeCompare(b.project));
// codeowners
const codeowners = new Set();
failedProjects.forEach(c => {
codeowners.add(c.codeowners);
});
core.setOutput('CODEOWNERS', Array.from(codeowners).join(','));
function trimSpace(res) {
return res.split('\n').map((l) => l.trim()).join('\n');
}
// failed message
let lastProject;
let result = `
\`\`\`
| Failed project | PM | OS | Node |
|--------------------------------|------|-------|------|`;
failedProjects.forEach(matrix => {
const project = matrix.project !== lastProject ? matrix.project : '...';
result += `\n| ${project.padEnd(30)} | ${matrix.package_manager.padEnd(4)} | ${matrix.os_name} | v${matrix.node_version} |`
lastProject = matrix.project;
});
result += `\`\`\``;
core.setOutput('SLACK_MESSAGE', trimSpace(result));
function humanizeDuration(num) {
let res = '';
const hours = Math.floor(num / 3600);
if (hours) {
res += `${hours}h `;
}
const mins = Math.floor((num % 3600) / 60);
if (mins) {
res += `${mins}m `;
}
const sec = num % 60;
if (sec) {
res += `${sec}s`
}
return res;
}
// duration message
const timeReport = {};
const pmReport = {
npm: 0,
yarn: 0,
pnpm: 0
};
const macosProjects = ['e2e-detox', 'e2e-expo', 'e2e-react-native'];
combined.forEach((matrix) => {
if (matrix.os_name === 'Linux' && matrix.node_version === 18) {
pmReport[matrix.package_manager] += matrix.duration;
}
if (matrix.os_name === 'Linux' || macosProjects.includes(matrix.project)) {
if (timeReport[matrix.project]) {
if (matrix.duration > timeReport[matrix.project].max) {
timeReport[matrix.project].max = matrix.duration;
timeReport[
matrix.project
].maxEnv = `${matrix.os_name}, ${matrix.package_manager}`;
}
if (matrix.duration < timeReport[matrix.project].min) {
timeReport[matrix.project].min = matrix.duration;
timeReport[
matrix.project
].minEnv = `${matrix.os_name}, ${matrix.package_manager}`;
}
} else {
timeReport[matrix.project] = {
min: matrix.duration,
max: matrix.duration,
minEnv: `${matrix.os_name}, ${matrix.package_manager}`,
maxEnv: `${matrix.os_name}, ${matrix.package_manager}`,
};
}
}
});
// project time report
let resultPkg = `
\`\`\`
| Project | Time |
|--------------------------------|---------------------------|`;
function mapProjectTime(proj, section) {
let res = '';
res += `${humanizeDuration(timeReport[proj][section])}`;
res += ` (${timeReport[proj][section + 'Env']})`
return res;
}
function durationIcon(proj, section) {
if (timeReport[proj][section] < 12 * 60) {
return `${section} ✅`;
}
if (timeReport[proj][section] < 15 * 60) {
return `${section} ❗`;
}
return `${section} ❌`;
}
Object.keys(timeReport).forEach(proj => {
resultPkg += `\n| ${proj.padEnd(30)} | |`;
resultPkg += `\n| ${durationIcon(proj, 'min').padStart(29)} | ${mapProjectTime(proj, 'min').padEnd(25)} |`;
resultPkg += `\n| ${durationIcon(proj, 'max').padStart(29)} | ${mapProjectTime(proj, 'max').padEnd(25)} |`;
});
resultPkg += `\`\`\``;
core.setOutput('SLACK_PROJ_DURATION', trimSpace(resultPkg));
// Print project duration report inline to allow reviewing on manual runs (when no slack message will be sent)
console.log(trimSpace(resultPkg));
let resultPm = `
\`\`\`
| PM | Total time |
|------|-------------|`;
Object.keys(pmReport).forEach(pm => {
resultPm += `\n| ${pm.padEnd(4)} | ${humanizeDuration(pmReport[pm]).padEnd(11)} |`
});
resultPm += `\`\`\``;
core.setOutput('SLACK_PM_DURATION', trimSpace(resultPm));
// Print package manager duration report inline to allow reviewing on manual runs (when no slack message will be sent)
console.log(trimSpace(resultPm));
report-failure:
if: ${{ failure() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: process-result
runs-on: ubuntu-latest
name: Report failure
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: 'failure'
message_format: '{emoji} Workflow has {status_message} ${{ needs.process-result.outputs.message }}'
notification_title: '{workflow}'
footer: '<{run_url}|View Run> / Last commit <{commit_url}|{commit_sha}>'
mention_groups: ${{ needs.process-result.outputs.codeowners }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
report-success:
if: ${{ success() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: e2e
runs-on: ubuntu-latest
name: Report status
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ needs.e2e.result }}
message_format: '{emoji} Workflow has {status_message}'
notification_title: '{workflow}'
footer: '<{run_url}|View Run> / Last commit <{commit_url}|{commit_sha}>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
report-pm-time:
if: ${{ always() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: process-result
runs-on: ubuntu-latest
name: Report duration per package manager
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: 'skipped'
message_format: '${{ needs.process-result.outputs.pm-duration }}'
notification_title: 'Total duration per package manager (ubuntu only)'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
report-proj-time:
if: ${{ always() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: process-result
runs-on: ubuntu-latest
name: Report duration per package manager
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: 'skipped'
message_format: '${{ needs.process-result.outputs.proj-duration }}'
notification_title: 'E2E Project duration stats'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
-388
View File
@@ -1,388 +0,0 @@
name: E2E matrix (Windows)
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
env:
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
permissions: { }
jobs:
preinstall:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: windows-latest
strategy:
matrix:
node_version:
- 20
- 18
name: Cache install (node v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Set node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v4
with:
lookup-only: true
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Install packages
run: pnpm install --frozen-lockfile
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v3
with:
lookup-only: true
path: '${{ github.workspace }}/.cypress'
key: windows-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: pnpm cypress install
e2e:
if: ${{ github.repository_owner == 'nrwl' }}
needs: preinstall
permissions:
contents: read
runs-on: windows-latest
strategy:
matrix:
node_version:
- 20
- 18
package_manager:
- npm
project:
- e2e-angular
- e2e-cypress
- e2e-esbuild
- e2e-eslint
- e2e-jest
- e2e-js
- e2e-lerna-smoke-tests
- e2e-next
- e2e-node
- e2e-nuxt
- e2e-nx-init
- e2e-nx
- e2e-playwright
- e2e-plugin
- e2e-react
- e2e-release
- e2e-remix
- e2e-rollup
- e2e-storybook
- e2e-vite
- e2e-vue
- e2e-web
- e2e-webpack
- e2e-workspace-create
include:
# codeowner groups
- project: e2e-angular
codeowners: 'S04SS457V38'
- project: e2e-cypress
codeowners: 'S04T16BTJJY'
- project: e2e-detox
codeowners: 'S04TNCNJG5N'
- project: e2e-esbuild
codeowners: 'S04SJ6HHP0X'
- project: e2e-expo
codeowners: 'S04TNCNJG5N'
- project: e2e-gradle
codeowners: 'S04TNCNJG5N'
- project: e2e-jest
codeowners: 'S04T16BTJJY'
- project: e2e-js
codeowners: 'S04SJ6HHP0X'
- project: e2e-lerna-smoke-tests
codeowners: 'S04TNCVEETS'
- project: e2e-eslint
codeowners: 'S04SYJGKSCT'
- project: e2e-next
codeowners: 'S04TNCNJG5N'
- project: e2e-node
codeowners: 'S04SJ6HHP0X'
- project: e2e-nx-init
codeowners: 'S04SYHYKGNP'
- project: e2e-nx
codeowners: 'S04SYHYKGNP'
- project: e2e-plugin
codeowners: 'S04SYHYKGNP'
- project: e2e-release
codeowners: 'S04SYHYKGNP'
- project: e2e-react
codeowners: 'S04TNCNJG5N'
- project: e2e-react-native
codeowners: 'S04TNCNJG5N'
- project: e2e-web
codeowners: 'S04SJ6PL98X'
- project: e2e-rollup
codeowners: 'S04SJ6PL98X'
- project: e2e-storybook
codeowners: 'S04SVQ8H0G5'
- project: e2e-playwright
codeowners: 'S04SVQ8H0G5'
- project: e2e-remix
codeowners: 'S04SVQ8H0G5'
- project: e2e-vite
codeowners: 'S04SJ6PL98X'
- project: e2e-vue
codeowners: 'S04SJ6PL98X'
- project: e2e-nuxt
codeowners: 'S04SJ6PL98X'
- project: e2e-webpack
codeowners: 'S04SJ6PL98X'
- project: e2e-workspace-create
codeowners: 'S04SYHYKGNP'
exclude:
# exclude non-CNW/Lerna tests from non-LTS node versions
- node_version: 18
project: e2e-angular
- node_version: 18
project: e2e-cypress
- node_version: 18
project: e2e-esbuild
- node_version: 18
project: e2e-jest
- node_version: 18
project: e2e-js
- node_version: 18
project: e2e-eslint
- node_version: 18
project: e2e-next
- node_version: 18
project: e2e-node
- node_version: 18
project: e2e-nuxt
- node_version: 18
project: e2e-nx-init
- node_version: 18
project: e2e-nx
- node_version: 18
project: e2e-plugin
- node_version: 18
project: e2e-playwright
- node_version: 18
project: e2e-react
- node_version: 18
project: e2e-web
- node_version: 18
project: e2e-remix
- node_version: 18
project: e2e-rollup
- node_version: 18
project: e2e-storybook
- node_version: 18
project: e2e-vite
- node_version: 18
project: e2e-vue
- node_version: 18
project: e2e-webpack
fail-fast: false
name: ${{ matrix.project }} (v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare dir for output
run: mkdir -p outputs
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8.7.4
run_install: false
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Install packages
run: pnpm install --frozen-lockfile
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v3
with:
path: '${{ github.workspace }}/.cypress'
key: ${{ runner.os }}-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
- name: Configure git metadata (needed for lerna smoke tests)
run: |
git config --global user.email test@test.com
git config --global user.name "Test Test"
- name: Run e2e tests
id: e2e-run
run: pnpm nx run ${{ matrix.project }}:e2e-local
shell: bash
timeout-minutes: 180
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: test@test.com
GIT_COMMITTER_NAME: Test
NX_E2E_CI_CACHE_KEY: e2e-gha-windows-${{ matrix.node_version }}-${{ matrix.package_manager }}
NODE_OPTIONS: --max_old_space_size=8192
SELECTED_PM: ${{ matrix.package_manager }}
npm_config_registry: http://localhost:4872
NX_CACHE_DIRECTORY: 'tmp'
NX_E2E_SKIP_CLEANUP: 'true'
NX_E2E_RUN_E2E: 'true'
NX_E2E_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
NX_DAEMON: 'true'
NX_SKIP_LOG_GROUPING: 'true'
- name: Save matrix config in file
if: ${{ always() }}
id: save-matrix
shell: bash
run: |
matrix=$((
echo '${{ toJSON(matrix) }}'
) | jq -c '. + { "status": "${{ steps.e2e-run.outcome}}" }')
echo "$matrix" > matrix
path=outputs/windows-${{ matrix.node_version}}-${{ matrix.package_manager}}-${{ matrix.project }}
echo "path=$path" >> $GITHUB_OUTPUT
echo "$matrix" > $path
- name: Upload matrix config
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: outputs
path: ${{ steps.save-matrix.outputs.path }}
- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled && failure() }}
uses: mxschmitt/action-tmate@v3.8
timeout-minutes: 15
with:
sudo: false # disable sudo for windows debugging
process-result:
if: ${{ always() && github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
needs: e2e
outputs:
message: ${{ steps.process-json.outputs.SLACK_MESSAGE }}
codeowners: ${{ steps.process-json.outputs.CODEOWNERS }}
steps:
- name: Load outputs
uses: actions/download-artifact@v3
with:
name: outputs
path: outputs
- name: Join and stringify matrix configs
id: combine-json
shell: bash
run: |
combined=$((jq -s . outputs/*) | jq tostring)
echo "combined=$combined" >> $GITHUB_OUTPUT
- name: Make slack outputs
id: process-json
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ github.token }}
with:
script: |
const combined = JSON.parse(${{ steps.combine-json.outputs.combined }});
const failedProjects = combined.filter(c => c.status === 'failure').sort((a, b) => a.project.localeCompare(b.project));
// codeowners
const codeowners = new Set();
failedProjects.forEach(c => {
codeowners.add(c.codeowners);
});
core.setOutput('CODEOWNERS', Array.from(codeowners).join(','));
// message
let result = `
*OS* Windows
*Package manager* npm
\`\`\`
| Failed project | Node |
|--------------------------------|------|`;
failedProjects.forEach(matrix => {
result += `\n| ${matrix.project.padEnd(30)} | v${matrix.node_version} |`
});
result += `\`\`\``;
const message = result.split('\n').map(l => l.trim()).join('\n');
core.setOutput('SLACK_MESSAGE', message);
report-failure:
if: ${{ failure() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: process-result
runs-on: ubuntu-latest
name: Report failure
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: 'failure'
message_format: '{emoji} Workflow has {status_message} ${{ needs.process-result.outputs.message }}'
notification_title: '{workflow}'
footer: '<{run_url}|View Run> / Last commit <{commit_url}|{commit_sha}>'
mention_groups: ${{ needs.process-result.outputs.codeowners }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
report-success:
if: ${{ success() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: e2e
runs-on: ubuntu-latest
name: Report success
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ needs.e2e.result }}
message_format: '{emoji} Workflow has {status_message}'
notification_title: '{workflow}'
footer: '<{run_url}|View Run> / Last commit <{commit_url}|{commit_sha}>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
-53
View File
@@ -1,53 +0,0 @@
name: Generate embeddings
on:
schedule:
- cron: "0 5 * * 0,4" # sunday, thursday 5AM
workflow_dispatch:
jobs:
cache-and-install:
if: github.repository == 'nrwl/nx'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Run embeddings script
run: pnpm exec nx run tools-documentation-create-embeddings:run-node
env:
NX_NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NX_NEXT_PUBLIC_SUPABASE_URL }}
NX_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.NX_SUPABASE_SERVICE_ROLE_KEY }}
NX_OPENAI_KEY: ${{ secrets.NX_OPENAI_KEY }}
-69
View File
@@ -1,69 +0,0 @@
name: Issue Statistics
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
permissions:
issues: read
pull-requests: read
jobs:
issues-report:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
name: Report status
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
with:
lookup-only: true
path: '**/node_modules'
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install packages
run: pnpm install --frozen-lockfile
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2 # Needed since we are downloading artifact from a different workflow run, official actions/download-artifact doesn't support this.
with:
name: cached-issue-data
path: ${{ github.workspace }}/scripts/issues-scraper/cached
search_artifacts: true
continue-on-error: true
- name: Collect Issue Data
id: collect
run: npx ts-node ./scripts/issues-scraper/index.ts
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v3
with:
name: cached-issue-data
path: ./scripts/issues-scraper/cached/data.json
- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.23.0
with:
payload: ${{ steps.collect.outputs.SLACK_MESSAGE }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ISSUES_REPORT_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
-30
View File
@@ -1,30 +0,0 @@
name: "Lock Threads"
on:
schedule:
- cron: "0 0 * * *" # Once a day, at midnight UTC
workflow_dispatch:
permissions:
issues: write
pull-requests: write
concurrency:
group: lock
jobs:
action:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4
id: lockthreads
with:
github-token: ${{ github.token }}
issue-inactive-days: "30" # Lock issues after 30 days of being closed
pr-inactive-days: "5" # Lock closed PRs after 5 days. This ensures that issues that stem from a PR are opened as issues, rather than comments on the recently merged PR.
add-issue-labels: "outdated"
issue-comment: >
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
pr-comment: >
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.
-46
View File
@@ -1,46 +0,0 @@
name: NPM Audit
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions: {}
jobs:
audit:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PNPM
run: |
npm install -g @pnpm/exe@8
- name: Run a security audit
run: pnpm dlx audit-ci --critical --report-type summary
# - name: Run Dependency confusion supply chain check
# run: npx snync -d .
report:
if: ${{ always() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: audit
runs-on: ubuntu-latest
name: Report status
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ needs.audit.result }}
message_format: '{emoji} Audit has {status_message}'
notification_title: '{workflow}'
footer: '<{run_url}|View Run> / Last commit <{commit_url}|{commit_sha}>'
mention_users: 'U01UELKLYF2,U9NPA6C90'
mention_users_when: 'failure,warnings'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
-459
View File
@@ -1,459 +0,0 @@
name: publish
on:
# Automated schedule - canary releases from master
schedule:
- cron: "0 3 * * 2-6" # Tuesdays - Saturdays, at 3am UTC
# Manual trigger - PR releases or dry-runs (based on workflow inputs)
workflow_dispatch:
inputs:
pr:
description: "PR Number - If set, a real release will be created for the branch associated with the given PR number. If blank, a dry-run of the currently selected branch will be performed."
required: false
type: number
release:
types: [ published ]
# Dynamically generate the display name for the GitHub UI based on the event type and inputs
run-name: ${{ github.event.inputs.pr && format('PR Release for {0}', github.event.inputs.pr) || github.event_name == 'schedule' && 'Canary Release' || github.event_name == 'workflow_dispatch' && !github.event.inputs.pr && 'Release Dry-Run' || github.ref_name }}
env:
DEBUG: napi:*
NX_RUN_GROUP: ${{ github.run_id }}-${{ github.run_attempt }}
CYPRESS_INSTALL_BINARY: 0
NODE_VERSION: 18
PNPM_VERSION: 8.15.7 # Aligned with root package.json (pnpm/action-setup will helpfully error if out of sync)
jobs:
# We first need to determine the version we are releasing, and if we need a custom repo or ref to use for the git checkout in subsequent steps.
# These values depend upon the event type that triggered the workflow:
#
# - schedule:
# - We are running a canary release which always comes from the master branch, we can use default ref resolution
# in actions/checkout. The exact version will be generated within scripts/nx-release.ts.
#
# - release:
# - We are running a full release which is based on the tag that triggered the release event, we can use default
# ref resolution in actions/checkout. The exact version will be generated within scripts/nx-release.ts.
#
# - workflow_dispatch:
# - We are either running a dry-run on the current branch, in which case the version will be statica and we can use
# default ref resolution in actions/checkout, or we are creating a PR release for the given PR number, in which case
# we should generate an applicable version number within publish-resolve-data.js and use a custom ref of the PR branch name.
resolve-required-data:
name: Resolve Required Data
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
outputs:
version: ${{ steps.script.outputs.version }}
dry_run_flag: ${{ steps.script.outputs.dry_run_flag }}
success_comment: ${{ steps.script.outputs.success_comment }}
publish_branch: ${{ steps.script.outputs.publish_branch }}
ref: ${{ steps.script.outputs.ref }}
repo: ${{ steps.script.outputs.repo }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
# Default checkout on the triggering branch so that the latest publish-resolve-data.js script is available
- uses: actions/checkout@v4
# Set up pnpm and node so that we can verify our setup and that the NPM_TOKEN secret will work later
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
check-latest: true
# Ensure that the NPM_TOKEN secret is still valid before wasting any time deriving data or building projects
- name: Check NPM Credentials
run: npm whoami && echo "NPM credentials are valid" || (echo "NPM credentials are invalid or have expired." && exit 1)
- name: Resolve and set checkout and version data to use for release
id: script
uses: actions/github-script@v7
env:
PR_NUMBER: ${{ github.event.inputs.pr }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('${{ github.workspace }}/scripts/publish-resolve-data.js');
await script({ github, context, core });
- name: (PR Release Only) Check out latest master
if: ${{ steps.script.outputs.ref != '' }}
uses: actions/checkout@v4
with:
# Check out the latest master branch to get its copy of nx-release.ts
repository: nrwl/nx
ref: master
path: latest-master-checkout
- name: (PR Release Only) Check out PR branch
if: ${{ steps.script.outputs.ref != '' }}
uses: actions/checkout@v4
with:
# Check out the PR branch to get its copy of nx-release.ts
repository: ${{ steps.script.outputs.repo }}
ref: ${{ steps.script.outputs.ref }}
path: pr-branch-checkout
- name: (PR Release Only) Ensure that nx-release.ts has not changed in the PR being released
if: ${{ steps.script.outputs.ref != '' }}
env:
FILE_TO_COMPARE: "scripts/nx-release.ts"
run: |
if ! cmp -s "latest-master-checkout/${{ env.FILE_TO_COMPARE }}" "pr-branch-checkout/${{ env.FILE_TO_COMPARE }}"; then
echo "🛑 Error: The file ${{ env.FILE_TO_COMPARE }} is different on the ${{ steps.script.outputs.ref }} branch on ${{ steps.script.outputs.repo }} vs latest master on nrwl/nx, cancelling workflow. If you did not modify the file, then you likely just need to rebase/merge latest master."
exit 1
else
echo "✅ The file ${{ env.FILE_TO_COMPARE }} is identical between the ${{ steps.script.outputs.ref }} branch on ${{ steps.script.outputs.repo }} and latest master on nrwl/nx."
fi
build:
needs: [resolve-required-data]
if: ${{ github.repository_owner == 'nrwl' }}
strategy:
fail-fast: false
matrix:
settings:
- host: macos-13
target: x86_64-apple-darwin
build: |
pnpm nx run-many --target=build-native -- --target=x86_64-apple-darwin
- host: windows-latest
build: pnpm nx run-many --target=build-native -- --target=x86_64-pc-windows-msvc
target: x86_64-pc-windows-msvc
# Windows 32bit (not needed)
# - host: windows-latest
# build: |
# yarn nx -- run-many --target=build-native -- --target=i686-pc-windows-msvc
# target: i686-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=x86_64-unknown-linux-musl
- host: macos-13
target: aarch64-apple-darwin
build: |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
export CC=$(xcrun -f clang);
export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
pnpm nx run-many --target=build-native -- --target=aarch64-apple-darwin
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: |
pnpm nx run-many --target=build-native -- --target=armv7-unknown-linux-gnueabihf
# Android (not needed)
# - host: ubuntu-latest
# target: aarch64-linux-android
# build: |
# pnpm nx run-many --target=build-native -- --target=aarch64-linux-android
# - host: ubuntu-latest
# target: armv7-linux-androideabi
# build: |
# pnpm nx run-many --target=build-native -- --target=armv7-linux-androideabi
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
npm i -g pnpm@8.15.7 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm nx run-many --target=build-native -- --target=aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{ needs.resolve-required-data.outputs.repo }}
ref: ${{ needs.resolve-required-data.outputs.ref }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup node
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
with:
node-version: ${{ env.NODE_VERSION }}
check-latest: true
cache: 'pnpm'
- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
target/
key: ${{ matrix.settings.target }}-cargo-registry
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with:
version: 0.10.0
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Setup node x86
if: matrix.settings.target == 'i686-pc-windows-msvc'
run: yarn config set supportedArchitectures.cpu "ia32"
shell: bash
- name: Install dependencies
if: ${{ !matrix.settings.docker }}
run: pnpm install --frozen-lockfile
timeout-minutes: 30
- name: Setup node x86
uses: actions/setup-node@v4
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: ${{ env.NODE_VERSION }}
check-latest: true
cache: pnpm
architecture: x86
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build
run: ${{ matrix.settings.build }}
- name: Build
run: ${{ matrix.settings.build }}
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: packages/**/*.node
if-no-files-found: error
build-freebsd:
needs: [resolve-required-data]
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: macos-13-large
name: Build FreeBSD
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
with:
repository: ${{ needs.resolve-required-data.outputs.repo }}
ref: ${{ needs.resolve-required-data.outputs.ref }}
- name: Build
id: build
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
uses: cross-platform-actions/action@v0.22.0
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
NX_PREFER_TS_NODE: true
PLAYWRIGHT_BROWSERS_PATH: 0
with:
operating_system: freebsd
version: '13.2'
architecture: x86-64
environment_variables: DEBUG RUSTUP_IO_THREADS CI NX_PREFER_TS_NODE PLAYWRIGHT_BROWSERS_PATH
shell: bash
run: |
env
whoami
sudo pkg install -y -f node libnghttp2 npm git
sudo npm install --location=global --ignore-scripts pnpm@8.15.7
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ pnpm --version ~~~~"
pnpm --version
pwd
ls -lah
whoami
env
freebsd-version
mkdir -p /Users/runner/work/_temp/_github_workflow
echo "{}" > /Users/runner/work/_temp/_github_workflow/event.json
pnpm install --frozen-lockfile --ignore-scripts
pnpm nx run-many --verbose --outputStyle stream --target=build-native -- --target=x86_64-unknown-freebsd
pnpm nx reset
rm -rf node_modules
rm -rf dist
echo "KILL ALL NODE PROCESSES"
killall node || true
echo "COMPLETE"
- name: Upload artifact
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
uses: actions/upload-artifact@v4
with:
name: bindings-freebsd
path: packages/**/*.node
if-no-files-found: error
publish:
if: ${{ github.repository_owner == 'nrwl' }}
name: Publish
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
needs:
- resolve-required-data
- build-freebsd
- build
env:
GH_TOKEN: ${{ github.token }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
steps:
- uses: actions/checkout@v4
with:
repository: ${{ needs.resolve-required-data.outputs.repo }}
ref: ${{ needs.resolve-required-data.outputs.ref }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
check-latest: true
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
# This command will appropriately fail if no artifacts are available
- name: List artifacts
run: ls -R artifacts
shell: bash
- name: Publish
env:
VERSION: ${{ needs.resolve-required-data.outputs.version }}
DRY_RUN: ${{ needs.resolve-required-data.outputs.dry_run_flag }}
PUBLISH_BRANCH: ${{ needs.resolve-required-data.outputs.publish_branch }}
run: |
echo ""
# Create and check out the publish branch
git checkout -b $PUBLISH_BRANCH
echo ""
echo "Version set to: $VERSION"
echo "DRY_RUN set to: $DRY_RUN"
echo ""
pnpm nx-release --local=false $VERSION $DRY_RUN
- name: (Stable Release Only) Trigger Docs Release
# Publish docs only on a full release
if: ${{ !github.event.release.prerelease && github.event_name == 'release' }}
run: npx ts-node ./scripts/release-docs.ts
- name: (PR Release Only) Create comment for successful PR release
if: success() && github.event.inputs.pr
uses: actions/github-script@v7
env:
SUCCESS_COMMENT: ${{ needs.resolve-required-data.outputs.success_comment }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const successComment = JSON.parse(process.env.SUCCESS_COMMENT);
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.inputs.pr }},
body: successComment
});
pr_failure_comment:
# Run this job if it is a PR release, running on the nrwl origin, and any of the required jobs failed
if: ${{ github.repository_owner == 'nrwl' && github.event.inputs.pr && always() && contains(needs.*.result, 'failure') }}
needs: [resolve-required-data, build, build-freebsd, publish]
name: (PR Release Failure Only) Create comment for failed PR release
runs-on: ubuntu-latest
steps:
- name: Create comment for failed PR release
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# This script is intentionally kept inline (and e.g. not generated in publish-resolve-data.js)
# to ensure that an error within the data generation itself is not missed.
script: |
const message = `
Failed to publish a PR release of this pull request, triggered by @${{ github.triggering_actor }}.
See the failed workflow run at: https://github.com/nrwl/nx/actions/runs/${{ github.run_id }}
`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.inputs.pr }},
body: message
});
-111
View File
@@ -1,111 +0,0 @@
on:
schedule:
- cron: "0 0 * * *"
name: Stale Bot workflow
permissions: { }
jobs:
build:
if: ${{ github.repository_owner == 'nrwl' }}
permissions:
issues: write # to close stale issues (actions/stale)
pull-requests: write # to close stale PRs (actions/stale)
name: stale
runs-on: ubuntu-latest
steps:
# This handles issues that need more info
- name: stale-more-info-needed
id: stale-more-info-needed
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 7
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "blocked: more info needed"
stale-issue-message: |
This issue has been automatically marked as stale because more information has not been provided within 7 days.
It will be closed in 21 days if no information is provided.
If information has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
# This handles PRs that need to be rebased
- name: stale-needs-rebase
id: stale-needs-rebase
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 7
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "blocked: needs rebased"
stale-issue-message: |
This PR has been automatically marked as stale because it has not been rebased in 7 days.
It will be closed in 21 days if it is not rebased.
If the PR has been rebased or you are working on rebasing it, please reply to keep it active.
If you do not have time, please let us know and we can rebase it.
Thanks for being a part of the Nx community! 🙏
# This handles issues that do not have a repro
- name: stale-repro-needed
id: stale-repro-needed
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 7
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "blocked: repro needed"
stale-issue-message: |
This issue has been automatically marked as stale because no reproduction was provided within 7 days.
Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue.
Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues.
This issue will be closed in 21 days if a reproduction is not provided.
If a reproduction has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
- name: stale-retry-with-latest
id: stale-retry-with-latest
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 7
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "blocked: retry with latest"
stale-issue-message: |
This issue has been automatically marked as stale because no results of retrying on the latest version of Nx was provided within 7 days.
It will be closed in 21 days if no results are provided.
If the issue is still present, please reply to keep it active.
If the issue was not present, please close this issue.
Thanks for being a part of the Nx community! 🙏
# This handles issues are really old and were made with a previous major
- name: stale-bug
id: stale-bug
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 180
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any activity for 6 months.
Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore.
If at this point, this is still an issue, please respond with updated information.
It will be closed in 21 days if no further activity occurs.
Thanks for being a part of the Nx community! 🙏
+4 -49
View File
@@ -1,58 +1,13 @@
node_modules
/.idea
/.fleet
.idea
/.vscode
dist
/build
/coverage
./test
test
.DS_Store
tmp
*.log
.ng_pkg_build
jest.debug.config.js
.tool-versions
/.nx-cache
/.nx
/.verdaccio/build/local-registry
/graph/client/src/assets/environment.js
/graph/client/src/assets/dev/environment.js
/graph/client/src/assets/generated-project-graphs
/graph/client/src/assets/generated-task-graphs
/graph/client/src/assets/generated-task-inputs
/graph/client/src/assets/generated-source-maps
/nx-dev/nx-dev/public/documentation
/nx-dev/nx-dev/public/images/open-graph
# Issues scraper creates these files, stored by github's cache
/scripts/issues-scraper/cached
# We don't commit a CHANELGELOG.md file to the repo, we only create Github releases
CHANGELOG.md
# Next.js
.next
out
# Angular Cache
.angular
# Local dev files
.env.local
.bashrc
.nx
*.node
# Fix for issue when working on the repo in a dev container
.pnpm-store
.nx/cache
.nx/workspace-data
.cargo/.package-cache
.cargo/bin/
.cargo/env
.cargo/registry/
.local/
.npm/
.profile
.rustup/
.tool-versions
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
changedFiles="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
node ./scripts/notify-lockfile-changes.js $changedFiles
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
node ./scripts/notify-lockfile-changes.js $changedFiles
-6
View File
@@ -1,6 +0,0 @@
#!/usr/bin/env sh
pnpm check-lock-files &&
pnpm check-commit &&
pnpm documentation &&
pnpm pretty-quick --check
-57
View File
@@ -1,57 +0,0 @@
launch-templates:
linux-medium:
resource-class: 'docker_linux_amd64/medium+'
image: 'ubuntu22.04-node20.11-v3'
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: test@test.com
GIT_COMMITTER_NAME: Test
SELECTED_PM: 'pnpm'
NPM_CONFIG_PREFIX: '/home/workflows/.npm-global'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/checkout/main.yaml'
- name: Cache restore
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/cache/main.yaml'
env:
KEY: 'pnpm-lock.yaml'
PATHS: |
node_modules
~/.cache/Cypress
~/.cache/ms-playwright
~/.pnpm-store
BASE_BRANCH: 'master'
- name: Install e2e deps
script: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- name: Install Pnpm
script: |
npm install -g pnpm@8
- name: Pnpm Install
script: |
pnpm install --frozen-lockfile
- name: Install Browsers
script: |
pnpm exec cypress install
pnpm exec playwright install
- name: Install Rust
script: |
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
rustup toolchain install 1.70.0
- name: Configure git metadata (needed for lerna smoke tests)
script: |
git config --global user.email test@test.com
git config --global user.name "Test Test"
- name: Load Cargo Env
script: echo "PATH=$HOME/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
-4
View File
@@ -1,4 +0,0 @@
distribute-on:
small-changeset: 8 linux-medium
medium-changeset: 10 linux-medium
large-changeset: 12 linux-medium
-2
View File
@@ -1,2 +0,0 @@
nx-dev/**/jest.config.js
.next
+18 -44
View File
@@ -1,44 +1,18 @@
tmp
/test
/build
node_modules
/package.json
/pnpm-lock.yaml
packages/workspace/src/generators/**/files/**/*.json
packages/angular/src/schematics/**/files/**/*.json
packages/angular/src/migrations/**/files/**/*.json
packages/web/src/generators/**/files/**/*.json
packages/node/src/schematics/**/files/**/*.json
packages/express/src/schematics/**/files/**/*.json
packages/nest/src/schematics/**/files/**/*.json
packages/react/src/schematics/**/files/**/*.json
packages/jest/src/schematics/**/files/**/*.json
packages/nx/src/plugins/js/lock-file/__fixtures__/**/*.*
packages/**/schematics/**/files/**/*.html
packages/**/generators/**/files/**/*.html
packages/nx/src/native/**/*.rs
packages/nx/src/native/native-bindings.js
packages/nx/src/native/index.d.ts
nx-dev/nx-dev/.next/
nx-dev/nx-dev/public/documentation
graph/client/src/assets/environment.js
graph/client/src/assets/dev/environment.js
graph/client/src/assets/generated-graphs
graph/client/src/assets/generated-project-graphs
graph/client/src/assets/generated-task-graphs
/.vscode
/.idea
/.fleet
/.github
/coverage
/.yarn
/.verdaccio/build/local-registry
/dist
/.env
CODEOWNERS
/.nx/cache
.pnpm-store
/.nx/workspace-data
tmp
/test
/build
node_modules
/package.json
packages/workspace/src/schematics/**/files/**/*.json
packages/workspace/src/core/dep-graph/vendor.js
packages/web/src/schematics/**/files/**/*.json
packages/node/src/schematics/**/files/**/*.json
packages/express/src/schematics/**/files/**/*.json
packages/nest/src/schematics/**/files/**/*.json
packages/react/src/schematics/**/files/**/*.json
packages/jest/src/schematics/**/files/**/*.json
/.vscode
/.idea
/.github
/coverage
/.yarn
+1 -2
View File
@@ -1,5 +1,4 @@
{
"singleQuote": true,
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"]
"endOfLine": "lf"
}
-48
View File
@@ -1,48 +0,0 @@
# path to a directory with all packages
storage: ../build/local-registry/storage
auth:
htpasswd:
file: ./htpasswd
# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
maxage: 60m
max_fails: 20
fail_timeout: 2m
yarn:
url: https://registry.yarnpkg.com
maxage: 60m
max_fails: 20
fail_timeout: 2m
packages:
'@*/*':
# scoped packages
access: $all
publish: $all
unpublish: $all
proxy: npmjs
'**':
# allow all users (including non-authenticated users) to read and
# publish all packages
access: $all
# allow all users (including non-authenticated users) to publish/publish packages
publish: $all
unpublish: $all
# if package is not available locally, proxy requests to 'yarn' registry
proxy: npmjs
# log settings
logs:
type: stdout
format: pretty
level: warn
publish:
allow_offline: true # set offline to true to allow publish offline
-1
View File
@@ -1 +0,0 @@
test:$6FrCaT/v0dwE:autocreated 2020-03-25T19:10:50.254Z
+199664
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-1.19.0.js
+465
View File
@@ -0,0 +1,465 @@
# Changelog
## Please use the [Github Releases](https://github.com/nrwl/nx/releases) page to see the changelog.
# 1.0.1
## Fixes
- **schematic:** add a migration to add tsconfig.tools.json ([c18baf0](https://github.com/nrwl/nx/commit/c18baf0))
# 1.0.0
## Fixes
- **schematics:** dep-graph visual style for affected lib ([8ca8548](https://github.com/nrwl/nx/commit/8ca8548))
- **schematics:** remove strict check for "file" option for dep-graph ([6aa6702](https://github.com/nrwl/nx/commit/6aa6702))
- **schematics:** add nxmodule forroot if not existing when generating ngrx for root ([e748e81](https://github.com/nrwl/nx/commit/e748e81))
- **schematics:** don't leak file descriptor in shared.ts/mtime ([aa1ff78](https://github.com/nrwl/nx/commit/aa1ff78)), closes [#403](https://github.com/nrwl/nx/issues/403)
- **schematics:** ignore errors when the tools directory already exists ([2a377fe](https://github.com/nrwl/nx/commit/2a377fe))
# 0.11.0
## Features
- [Support to generate visualization graph](https://github.com/nrwl/nx/commit/49525efe3e31ff93dccf68499300fe35deaac78f)
# 0.10.1
## Features
- [Add support for workspace-specific schematics](https://github.com/nrwl/nx/commit/bc559575f524aacbe3d25eb97210101e60de4526)
## Fixes
- [Extend ngrx and Angular schematics](https://github.com/nrwl/nx/commit/0c2b01bda6904e09f0c4f997ef4a98818723b795)
# 0.10.0
## Features
- [Use npm-run-all to run build in parallel](https://github.com/nrwl/nx/commit/7b63de662e3aa99a8688681f0e26518ca05ffcbc)
- [Enhance nxEnforceModuleBoundaries check to support projects tagged with multiple tags](https://github.com/nrwl/nx/commit/d416c580b5db181cedf45ed952d9b6db49bb084d)
- [Add a usage information option to create-nx-workspace ](https://github.com/nrwl/nx/commit/2746f0399d0c729ff08420f46f2c2c6b4256f6a7)
- [Add an option to pass a custom module name when creating libs](https://github.com/nrwl/nx/commit/c1ca7df014043d0e27517b26470067677c57efa3)
- [Affected support for uncommitted changes](https://github.com/nrwl/nx/commit/113b51bd330c2af058675386e482d38f170a6688)
- [Extend circular dependency check](https://github.com/nrwl/nx/commit/fff9659c3a108b613c6db89bcca4072494fbe85f)
- [Add lint checks ensuring the integrity of the workspace](https://github.com/nrwl/nx/commit/ce553b732e8ca004e1ecf53cf54bcadb6ba1f7f3)
## Fixes
- [Fix the absolute import check](https://github.com/nrwl/nx/commit/de138bb26cb816b86afe6b8f14abb362cec2a20e)
- [Use yargs-parser to allow more types of arguments](https://github.com/nrwl/nx/commit/c747a4a0a066975bdbbda10234b78e3c63c3b44d)
- [Fix e2e lint config in angular cli json](https://github.com/nrwl/nx/commit/fc0bec90805217d03bf2008e9b241025cad72c05)
- [Handle undefined rulesDirectory](https://github.com/nrwl/nx/commit/8beae9fa3d6d905778dd24c5e6b27fe7c534be13)
- [Add appRoot.path for filesystem reads/writes](https://github.com/nrwl/nx/commit/809bdd4c270baf7fd883980db8d7171ebf09508e)
- [Correct docstring for affected](https://github.com/nrwl/nx/commit/6394f9e1edf5a0b1f219050dc8b1e8269d5e5c2b)
- [Update karma conf with app check](https://github.com/nrwl/nx/commit/fea4f48decdfa17feb5e020318abf2ac319d05da)
- [Fix typo in CONTIRBUTING.md](https://github.com/nrwl/nx/commit/bd50643d60b3c2a8e8ace6ceaab5834d897b4aa3)
- [Match ng lib and update versions ](https://github.com/nrwl/nx/commit/8482177b7373844d833aaad55e15a2a10d4ae116)
# 0.9.0
A large workspace contains a lot of apps and libs. Because it is so easy to share code, create new libs and depend on libs, the dependencies between the apps and libs can quickly get out of hand. We need a way to impose constraints on the dependency graph. This release adds this capability.
When creating an app or a lib, you can tag them:
```
ng g lib apilib --tags=api
ng g lib utilslib --tags=utils
ng g lib impllib --tags=impl
ng g lib untaggedlib
```
You can also pass multiple tags `ng g lib apilib --tags=one,two` or modify `.angular-cli.json` after the fact.
You can then define constraints in `tslint.json`, like this:
```
"nx-enforce-module-boundaries": [
true,
{
"allow": [],
"depConstraints": [
{ "sourceTag": "utils", "onlyDependOnLibsWithTags": ["utils"] },
{ "sourceTag": "api", "onlyDependOnLibsWithTags": ["api", "utils"] },
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["api", "utils", "impl"] },
]
}
]
```
With this configuration in place:
- `utilslib` can depend on no libs.
- `apilib` can depend on `utilslib`
- `implib` can depend on both `utilslib` and `apilib`.
- `untaggedlib` can depend on no libs.
This gets really useful once you have multiple libs with the same tag.
You can also use wildcards, like this:
```
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["*"] } // impl can depend on anything
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] } // anything can depend on anything
```
The system goes through the constrains until it finds the first one matching the source file it's analyzing.
If we change the configuration to the following:
```
"nx-enforce-module-boundaries": [
true,
{
"allow": [],
"depConstraints": [
{ "sourceTag": "utils", "onlyDependOnLibsWithTags": ["utils"] },
{ "sourceTag": "api", "onlyDependOnLibsWithTags": ["api", "utils"] },
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["api", "utils", "impl"] },
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] },
]
}
]
```
The following will be true.
- `utilslib` can depend on no libs.
- `apilib` can depend on `utilslib`
- `implib` can depend on both `utilslib` and `apilib`.
- `untaggedlib` can depend on **all** libs.
## Features
- [Cache the dependency graph to speed up "ng lint"](https://github.com/nrwl/nx/commit/93ecf24bdadfa7ae28cf802b4f3193390858db90)
- [Add lint check for circular deps](https://github.com/nrwl/nx/commit/53175f925e804539aacba8323af159d69205ddac)
- [Add support for tagged libs](https://github.com/nrwl/nx/commit/2842cb9c387226c24c0a42a154f3c65059d730f3)
- [Show warnings about importing lazy loadable libraries](https://github.com/nrwl/nx/commit/56788ba3d1a8220455b03f0c766963ae8179ce81)
- [Allow users to set prettier config](https://github.com/nrwl/nx/commit/56a6611575fee7b111655d2223f3e30ea684d000)
- [Add store-freeze support](https://github.com/nrwl/nx/commit/e21caa0143862059d4b1089ccf3a7e3799cef0f2)
- [Extend the nrwl schematics from the angular cli schematics](https://github.com/nrwl/nx/commit/04f8e2fd4613aff4064123cacd8eb54e1da09a60)
## Fixes
- [Improve windows compatibility](https://github.com/nrwl/nx/commit/4f052bb3e60f20d0d676f283de2e2faece0dcef8)
- [Dasherize the state folder](https://github.com/nrwl/nx/commit/b17b186186ea5617b1b953f1ddd4ab05ebfa7d92)
- [Fix create-nx-workspace to respect the --directory](https://github.com/nrwl/nx/commit/da9310e9dbb4eb3294200ca72bfa70b14faec2c2)
- [Fix protractor.conf.js schema](https://github.com/nrwl/nx/commit/37cabafb35980ce8e991abc1269387b3aaaf9f25)
# 0.8.0
## Features
Nx no longer uses a patched version of the CLI--we switched to using `@angular/cli@1.7.1`. We also renamed the nx-migrate command into `update` to align with the CLI.
- [Switch to @angular/cli 1.7](https://github.com/nrwl/nx/commit/acdeb1b71c14e3bc7e5bd2bc925640ad7d0aa24d)
- [Add update, update:skip, and update:check commands](https://github.com/nrwl/nx/commit/2fb62597514f1c82e4d80d75a7d60d11229d5aa3)
## Fixes
- [Fix format:write --libs-and-apps](https://github.com/nrwl/nx/commit/feeaba1a4b8d827a71731d919740135464d6e049)
- [Change format to default to format-all when no patterns are detected](https://github.com/nrwl/nx/commit/58e99ab04d8e9505285bdcf31014f3774a6f900a)
## Cleanup
- [Remove the version property](https://github.com/nrwl/nx/commit/24063f02464b6da38e003841e04820dcc347e876)
- [Use schematic context to format the generated code](https://github.com/nrwl/nx/commit/e7481a790f5becffc46e794ec46c0835a2114319)
# 0.7.4
## Features
- [Change generate effect tests to use toBeObservable](https://github.com/nrwl/nx/commit/222efe2f2630b02f6fdb11f560c9158cd4f51d75)
## Fixes
- [Base projectPath on the full path instead of the current working directory of the process](https://github.com/nrwl/nx/commit/545f2ff13902a635b9c26854e9687790adff0616)
- [Ammend command in script errors](https://github.com/nrwl/nx/commit/9128fa8be1e31525acb6043ff87af73b6b884aaa)
# 0.7.2
## Features
- [Added a post install script that run nx-migrate:check](https://github.com/nrwl/nx/commit/93a6b4e94be4b1b591eb017e77b79c777bc23deb)
- [Updated create-nx-workspace to support yarn](https://github.com/nrwl/nx/commit/e5b247b573cef0c1cf5cc5163d030dbf514f4dff)
## Cleanup
- [Cleaned up the output of nx-migrate](https://github.com/nrwl/nx/commit/7ab14e3b26e0e91d660ad5bb454dccb21b9745cf)
# 0.7.0
## Features
- [Add nx-migrate:check and nx-migrate:skip scripts](d7ba9fdc1b9f4208db6de32184e953d00f6f064f)
# 0.7.0-beta.1
## Features
- [Switch to Angular 5.2 and CLI 1.6.5](https://github.com/nrwl/nx/commit/172c18dc9b84f7ac3019694e4a0eeeb40dd1bc26)
# 0.6.18
## Bug Fixes
- [Fixed affected: commands. Continue traversing within irrelevant PropertyAssignment nodes](https://github.com/nrwl/nx/commit/2293e28bd031efa80566228dddc202bc437c2b03)
- [Make affected and format windows-friendly](https://github.com/nrwl/nx/commit/9609fc675031bd4dca285ceb942a71d995d1ee7b)
## Cleanup
- [Clean up tslint configuration](https://github.com/nrwl/nx/commit/828e4fe75da66dc41790e55a7738192940a04cbf)
- [Add a migration updating the version of prettier](https://github.com/nrwl/nx/commit/847a249980c3505845a8c597de8e9a3d78766f8b)
# 0.6.13
## Bug Fixes
- [Avoid relative paths to node modules](https://github.com/nrwl/nx/commit/2c49c3029535a9b98216d367e9c2b77a8d40a4a4)
- [Handle the case when libraries are placed in the directory with the same name as an app](https://github.com/nrwl/nx/commit/f862ed05d18e1474156779ad1dee2e7a7c785d1d)
# 0.6.10
## Features
- [Improve error messages in the affected: and format: commands](https://github.com/nrwl/nx/commit/878784ae814ffea28796f458ff2f8b0b641996c0)
## Bug Fixes
- [Handle circular deps between apps and libs](https://github.com/nrwl/nx/commit/3531323fb5210b995b1296a198c8e76ee8bf9a07)
- [Handle projects that have similar names](https://github.com/nrwl/nx/commit/fe7032d29f4dcd66b51dbb889a1cf1751cd1d20a)
- [Update workspace to set \$schema and app name](https://github.com/nrwl/nx/commit/df5bd089b6515ea747f891bf590b46a4e00d0a92)
- [Update workspace to copy the cli file](https://github.com/nrwl/nx/commit/ddd8de3813f374a752b0e6f47deaa58c2e9f40c8)
- [Disallow importing apps](https://github.com/nrwl/nx/commit/912fc81708d381f49950255eeff746a2dfd46c7b)
# 0.6.5
## Features
This release adds the following commands:
```
npm run format:write -- SHA1 SHA2
npm run format:check -- SHA1 SHA2
```
The `format:check` command checks that the files touched between the given SHAs are formatted properly, and `format:write` formats them.
Instead of passing the two SHAs, you can also pass the list of files, like this:
```
npm run format:write -- --files="libs/mylib/index.ts,libs/mylib2/index.ts"
npm run format:check -- --files="libs/mylib/index.ts,libs/mylib2/index.ts"
```
You can add `--libs-and-apps` flag to always run the formatter on apps and libs instead of individual files.
```
npm run format:write -- SHA1 SHA2 --libs-and-apps
npm run format:check -- SHA1 SHA2 --libs-and-apps
```
Finally, you can the command on the whole repo, like this:
```
npm run format:write
npm run format:check
```
- [Add format:check and format:write commands](https://github.com/nrwl/nx/commit/826a0b1056f9000425e189bad5a5d63966c3a704)
## Bug Fixes
- [Only allow importing libs using the configured npm scope](https://github.com/nrwl/nx/commit/c836668541532e64db088ef9a984678022abb3bd)
# 0.6.0
## Features
This release adds the following commands:
```
npm run apps:affected -- SHA1 SHA2
npm run build:affected -- SHA1 SHA2
npm run e2e:affected -- SHA1 SHA2
```
The `apps:affected` prints the apps that are affected by the commits between the given SHAs. The `build:affected` builds them, and `e2e:affected` runs their e2e tests.
To be able to do that, Nx analyzes your monorepo to figure out the dependency graph or your libs and apps. Next, it looks at the files touched by the commits to figure out what apps and libs they belong to. Finally, it uses all this information to generate the list of apps that can be affected by the commits.
Instead of passing the two SHAs, you can also pass the list of files, like this:
```
npm run apps:affected -- --files="libs/mylib/index.ts,libs/mylib2/index.ts"
npm run build:affected ----files="libs/mylib/index.ts,libs/mylib2/index.ts"
npm run e2e:affected ----files="libs/mylib/index.ts,libs/mylib2/index.ts"
```
- [Add support for building and testing only the apps affected by a commit](https://github.com/nrwl/nx/commit/428762664acc5fd155dd7be630dab09101d23542)
## Bug Fixes
- [Make deep import check work for libs with same prefix](https://github.com/nrwl/nx/commit/3c55f34ca12a4d5338099586ffe9455c81a3b199)
# 0.5.3
`ng new myproj --collection=@nrwl/schematics` creates a new workspace.
For this to work `@nrwl/schematics` and `@angular/cli` have to be installed globally, and they have to be compatible. This is error prone, and it often results in hard to debug errors. And it is impossible for Nx to solve this problem because we do not control your globally installed npm modules.
That is why we provided a way to create a new workspace using a sandbox that does not depend on any global modules, like this:
```
curl -fsSL https://raw.githubusercontent.com/nrwl/nx/master/packages/install/install.sh | bash -s myprojectname
```
This works, but with one caveat: you have to have `curl` and `bash` installed, which might be a problem for a lot of windows folks. That is why starting with `0.5.3`, `@nrwl/schematics` ships with a binary that works on all platforms and creates an Nx workspace without relying on globally installed npm modules.
This is what you can do now:
```
yarn global add @nrwl/schematics # do it once
create-nx-workspace myproj
```
Some folks also reported having problems running Nx behind a firewall, in a corporate environment. We fixed them as well.
## Features
- [Replace install.sh with a more robust way of creating projects](https://github.com/nrwl/nx/commit/f91b5309bdaf764e436bd544ec4f10c84b99cb08)
- [Bump up the version of prettier](https://github.com/nrwl/nx/commit/1481d169bbb7f1fbe3df5af2bce51c4215776d93)
## Bug Fixes
- [Generate an angular-cli config without the apps array, so the CLI can error properly](https://github.com/nrwl/nx/commit/a7f06edf5914212bcefbafb1198d262e9692cfdb)
# 0.5.2
## Bug Fixes
- [Remove default prop for viewEncapsulation option flag](https://github.com/nrwl/nx/commit/b46eb1c699dd509f4be103979a5938c3f7486fb1)
- [Fix NPM link in README](https://github.com/nrwl/nx/commit/4aa42e4772522a20df384ab9a48861a8d4f7ab0f)
- [Change rxjs version to use hat](https://github.com/nrwl/nx/commit/3b1942ed830ea31269a1fb9e995efb93b182870a)
# 0.5.1
## Features
- [Disable typescript mismatch warnings](https://github.com/nrwl/nx/commit/ecb87a0dcd08f0968d77508976ce43a84f049743)
## Bug Fixes
- ["ng test" should not compile e2e tests](https://github.com/nrwl/nx/commit/ac53e9a624b01cf71f88eb412678ffc48125ff38)
- [Fix 'npm run format'](https://github.com/nrwl/nx/commit/670cd57dfa7d5bbf6b9af4e52f2c7d40081138cb)
# 0.5.0
## Features
- [Update the workspace to use Angular 5.1 and CLI 1.6](https://github.com/nrwl/nx/commit/a477bb9fc953e3b44d696945cc259119f701fb78)
# 0.4.0
## Features
- [Add support for generating nested apps and libs](https://github.com/nrwl/nx/commit/013a828d1e31f55a9b3f7c69587316890ea834d4)
- [Update NgRx schematic to allow the customization of the state folder](https://github.com/nrwl/nx/commit/a2d02652665f497be8958efc403d7a44bd831088)
## Bug Fixes
- [Only begin converting to workspace once files have been checked](https://github.com/nrwl/nx/commit/e7fd6b1e04f3f3387a91c53a7ac479fe72bdd72e)
- ["ng build" should only recompile the selected app](https://github.com/nrwl/nx/commit/550de7bb80f4d3f306c23fac70db52c98dadcd05)
## Refactoring
- [Eliminated single letter variable names in effects template](https://github.com/nrwl/nx/commit/996143cf60bac1a57629815d5756db9ce23193ab)
# 0.3.0
We want to be able to add new features to Nx without breaking existing workspaces. Say, you created an Nx Workspace using Nx 0.2.0. Then, half a year later, you decided to upgrade the version of Nx to 0.5.0. Imagine the 0.5.0 release requires you to have more information in your `.angular-cli.json`. Until now, you would have to manually go through the changelog and modify your `.angular-cli.json`. This release adds the `nx-migrate` command that does it for you. Run `npm run nx-migrate` after upgrading `@nrwl/schematics`, and it will upgrade your workspace to be 0.5.0 compatible.
## Features
- [add `allow` option to whitelist deep imports](https://github.com/nrwl/nx/commit/b3f67351fe8890e06402672e687b1789f279613b)
- [Added the nx-migrate command](https://github.com/nrwl/nx/commit/d6e66b99316181b8b67805b91cc35457c3465029)
- [Upgrade Prettier to 1.8.2](https://github.com/nrwl/nx/commit/cc2277e91be2ca49fb1588f1d8e29ef91fd12044)
- [Update readme to point to example apps using Nx](https://github.com/nrwl/nx/commit/3d53e31391d5d79a0724d099c7121edb53e8b163)
# 0.2.2
## Bug Fixes
- [Adds a schema file to allow custom properties that the default CLI distribution does not support](https://github.com/nrwl/nx/commit/7fd7594e673cf38af7668b891ed7c75b390b3330)
- [Fix issue with generating a wrong full path on windows](https://github.com/nrwl/nx/commit/11e6c055ba1211a5bee1cc73d46663985645f08e)
# 0.2.1
## New Features
- [Export jasmine-marbles getTestScheduler and time functions](https://github.com/nrwl/nx/commit/2e4613f475fc2673731540fb4724d6ba2af02aae)
- [Use fetch instead of optimisticUpdate in the generated effect classes](https://github.com/nrwl/nx/commit/c9759cc4427283422e906ed19a8a2dabcb2a656b)
## Bug Fixes
- [--routing should add RouterTestingModule](https://github.com/nrwl/nx/commit/d7fc5b56054c9a4c1fbb12845bfc0803f9a9ff86)
- [Fix wording in the documentation](https://github.com/nrwl/nx/commit/058c8995f35a9e677f88404bc9c8a2b177487080)
## Refactorings
- [Refactor Nx to use RxJS lettable operators](https://github.com/nrwl/nx/commit/715efa4b225b65be0052a1e6a88c5bdcd5a6cf38)
# 0.2.0
## New Features
### Changing Default Library Type
We changed the default library type from "simple" to "Angular". So where previously you would run:
```
ng generate lib mylib // simple TS library
ng generate lib mylib --ngmodule // an angular library
```
Now, you run:
```
ng generate lib mylib // an angular library
ng generate lib mylib --nomodule // simple ts library
```
### Generating Router Configuration
You can pass `--routing` when generating an app.
```
ng generate app myapp --routing // generate an angular app with router config
```
The generated app will have `RouterModule.forRoot` configured.
You can also pass it when generating a library, like this:
```
ng generate lib mylib --routing
```
This will set up the router module and will create an array of routes, which can be plugged into the parent module. This configuration works well for modules that aren't loaded lazily.
You can add the `--lazy` to generate a library that is loaded lazily.
```
ng generate lib mylib --routing --lazy
```
This will also register the generated library in tslint.json, so the linters will make sure the library is not loaded lazily.
Finally, you can pass `--parentModule` and the schematic will wire up the generated library in the parent router configuration.
```
ng generate lib mylib --routing --parentModule=apps/myapp/src/myapp.module.ts
ng generate lib mylib --routing --lazy --parentModule=apps/myapp/src/myapp.module.ts
```
-194
View File
@@ -1,194 +0,0 @@
# Any file not covered by a rule below, will default to Jason + Victor and a few select others.
* @FrozenPandaz @vsavkin
/packages/**/* @FrozenPandaz @vsavkin @AgentEnder @jaysoo @JamesHenry
/e2e/**/* @FrozenPandaz @vsavkin @AgentEnder @jaysoo @JamesHenry
/scripts/**/* @FrozenPandaz @vsavkin @AgentEnder @jaysoo @JamesHenry
/tools/**/* @FrozenPandaz @vsavkin @AgentEnder @jaysoo @JamesHenry
package.json @nrwl/nx-core-reviewers
pnpm-lock.yaml @nrwl/nx-core-reviewers
rust-toolchain @nrwl/nx-native-reviewers
# Docs Site + Graph
/docs @nrwl/nx-docs-reviewers
/docs/nx-cloud @StalkAltan @rarmatei @nrwl/nx-docs-reviewers
/graph/** @philipjfulcher @FrozenPandaz @bcabanes @MaxKless @xiongemi
/images @nrwl/nx-docs-reviewers
/nx-dev/** @nrwl/nx-docs-reviewers
/typedoc-theme @nrwl/nx-docs-reviewers
# Plugin Verticals
## Angular
/docs/generated/packages/angular/** @nrwl/nx-angular-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/angular/** @nrwl/nx-angular-reviewers @nrwl/nx-docs-reviewers
/packages/angular/** @nrwl/nx-angular-reviewers
/e2e/angular/** @nrwl/nx-angular-reviewers
/packages/angular/plugins/component-testing.ts @nrwl/nx-angular-reviewers @nrwl/nx-testing-tools-reviewers
/packages/angular/src/generators/cypress-component-configuration/** @nrwl/nx-angular-reviewers @nrwl/nx-testing-tools-reviewers
/packages/angular/src/generators/component-test/** @nrwl/nx-angular-reviewers @nrwl/nx-testing-tools-reviewers
## React
/docs/generated/packages/react/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/next/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/react/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/next/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/packages/react/** @nrwl/nx-react-reviewers
/e2e/react/** @nrwl/nx-react-reviewers
/packages/next/** @nrwl/nx-react-reviewers
/e2e/next/** @nrwl/nx-react-reviewers
/packages/react/plugins/component-testing/** @nrwl/nx-react-reviewers @nrwl/nx-testing-tools-reviewers
/packages/react/src/generators/cypress-component-configuration/** @nrwl/nx-react-reviewers @nrwl/nx-testing-tools-reviewers
/packages/react/src/generators/component-test/** @nrwl/nx-react-reviewers @nrwl/nx-testing-tools-reviewers
# React Native
/docs/generated/packages/detox/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/expo/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/react-native/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/react-native/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/packages/detox/** @nrwl/nx-react-reviewers
/e2e/detox/** @nrwl/nx-react-reviewers
/packages/expo/** @nrwl/nx-react-reviewers
/e2e/expo/** @nrwl/nx-react-reviewers
/packages/react-native/** @nrwl/nx-react-reviewers
/e2e/react-native/** @nrwl/nx-react-reviewers
## remix
/docs/generated/packages/remix/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers @Coly010
/packages/remix/** @nrwl/nx-react-reviewers @Coly010
/e2e/remix/** @nrwl/nx-react-reviewers @Coly010
# Vue
/packages/vue/** @nrwl/nx-vue-reviewers
/e2e/vue/** @nrwl/nx-vue-reviewers
/packages/nuxt/** @nrwl/nx-vue-reviewers
/e2e/nuxt/** @nrwl/nx-vue-reviewers
## Node
/docs/generated/packages/node/** @nrwl/nx-node-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/nest/** @nrwl/nx-node-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/express/** @nrwl/nx-node-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/node/** @nrwl/nx-node-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/express/** @nrwl/nx-node-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/nest/** @nrwl/nx-node-reviewers @FrozenPandaz @nrwl/nx-docs-reviewers
/packages/node/** @nrwl/nx-node-reviewers
/packages/express/** @nrwl/nx-node-reviewers
/packages/nest/** @nrwl/nx-node-reviewers
/e2e/node/** @nrwl/nx-node-reviewers
## JS
/docs/generated/packages/js/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/web/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/webpack/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/esbuild/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/rollup/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/vite/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/js/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/web/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/webpack/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/esbuild/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/vite/** @nrwl/nx-js-reviewers @nrwl/nx-docs-reviewers
/packages/js/** @nrwl/nx-js-reviewers
/e2e/js/** @nrwl/nx-js-reviewers
/packages/web/** @nrwl/nx-js-reviewers
/e2e/web/** @nrwl/nx-js-reviewers
/packages/webpack/** @nrwl/nx-js-reviewers
/packages/webpack/src/utils/module-federation @jaysoo @Coly010
/e2e/webpack/** @nrwl/nx-js-reviewers
/packages/esbuild/** @nrwl/nx-js-reviewers
/e2e/esbuild/** @nrwl/nx-js-reviewers
/packages/rollup/** @nrwl/nx-js-reviewers
/e2e/rollup/** @nrwl/nx-js-reviewers
/packages/vite/** @nrwl/nx-js-reviewers
/e2e/vite/** @nrwl/nx-js-reviewers
## Tools
/docs/generated/packages/cypress/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/cypress/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/jest/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/jest/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/playwright/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/playwright/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/packages/cypress/** @nrwl/nx-testing-tools-reviewers
/e2e/cypress/** @nrwl/nx-testing-tools-reviewers
/packages/jest/** @nrwl/nx-testing-tools-reviewers
/e2e/jest/** @nrwl/nx-testing-tools-reviewers
/packages/playwright/** @nrwl/nx-testing-tools-reviewers
/e2e/playwright/** @nrwl/nx-testing-tools-reviewers
# Linter
/docs/generated/packages/eslint-plugin/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/eslint/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/eslint/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
/packages/eslint-plugin/** @nrwl/nx-linter-reviewers
/packages/eslint/** @nrwl/nx-linter-reviewers
/e2e/eslint/** @nrwl/nx-linter-reviewers
.eslint* @nrwl/nx-linter-reviewers
# Storybook
/docs/generated/packages/storybook/** @nrwl/nx-storybook-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/storybook/** @nrwl/nx-storybook-reviewers @nrwl/nx-docs-reviewers
/packages/storybook/** @nrwl/nx-storybook-reviewers
/e2e/storybook/** @nrwl/nx-storybook-reviewers
## Devkit
/docs/generated/devkit/** @nrwl/nx-devkit-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/devkit/** @nrwl/nx-devkit-reviewers @nrwl/nx-docs-reviewers
/packages/devkit/** @nrwl/nx-devkit-reviewers
/packages/devkit/index.ts @FrozenPandaz @vsavkin
/packages/devkit/public-api.ts @FrozenPandaz @vsavkin
# Gradle
/packages/gradle/** @FrozenPandaz @xiongemi
/e2e/gradle/** @FrozenPandaz @xiongemi
# Nx-Plugin
/docs/generated/packages/plugin/** @nrwl/nx-devkit-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/plugin/** @nrwl/nx-devkit-reviewers @nrwl/nx-docs-reviewers
/packages/plugin/** @nrwl/nx-devkit-reviewers
/e2e/plugin/** @nrwl/nx-devkit-reviewers
## Core
/docs/generated/cli/** @nrwl/nx-core-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/nx/** @nrwl/nx-core-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/workspace/** @nrwl/nx-core-reviewers @nrwl/nx-docs-reviewers
/packages/nx/** @nrwl/nx-core-reviewers
/packages/nx/src/adapter @nrwl/nx-core-reviewers @leosvelperez
/packages/nx/src/native @nrwl/nx-core-reviewers @nrwl/nx-native-reviewers
/packages/nx/src/plugins/js/lock-file @nrwl/nx-core-reviewers @meeroslav
/packages/nx/src/command-line/init/implementation/angular/** @nrwl/nx-angular-reviewers @nrwl/nx-core-reviewers
/e2e/nx-init/src/nx-init-angular.test.ts @nrwl/nx-angular-reviewers
/packages/nx/src/command-line/init/implementation/react/** @nrwl/nx-react-reviewers
/e2e/nx-init/src/nx-init-react.test.ts @nrwl/nx-react-reviewers
/e2e/nx-init/src/files/cra/** @nrwl/nx-react-reviewers
/e2e/nx*/** @nrwl/nx-core-reviewers
/packages/workspace/** @nrwl/nx-core-reviewers
/e2e/workspace-create/** @nrwl/nx-core-reviewers
/e2e/release/** @nrwl/nx-core-reviewers
# Misc
/e2e/lerna-smoke-tests/** @vsavkin @JamesHenry
/e2e/utils/** @meeroslav @nrwl/nx-testing-tools-reviewers @vsavkin @mandarini
/community @nrwl/nx-docs-reviewers
/CONTRIBUTING.md @FrozenPandaz @isaacplmann
/CODE_OF_CONDUCT.md @FrozenPandaz @isaacplmann
/CODEOWNERS @FrozenPandaz @AgentEnder
# Scripts
/scripts/documentation @nrwl/nx-docs-reviewers
/scripts/angular-support-upgrades @nrwl/nx-angular-reviewers
# CI
/.circleci/** @nrwl/nx-pipelines-reviewers
/.nx/workflows/** @nrwl/nx-pipelines-reviewers
/.github/** @nrwl/nx-pipelines-reviewers
/.husky/** @nrwl/nx-pipelines-reviewers
/packages/workspace/src/generators/ci-workflow/** @nrwl/nx-pipelines-reviewers
# Global Files
project.json @FrozenPandaz @vsavkin
jest.config.ts @nrwl/nx-testing-tools-reviewers @FrozenPandaz
jest.preset.js @nrwl/nx-testing-tools-reviewers @FrozenPandaz
# Overrides - These are applied last, so override any matches above.
docs/generated/manifests/* @nrwl/nrwlians
docs/generated/packages-metadata.json @FrozenPandaz @jaysoo @AgentEnder @nrwl/nx-docs-reviewers
-11
View File
@@ -1,11 +0,0 @@
# Contributor Code of Conduct
As contributors and maintainers of the Nx project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.
Communication through any of Nx's channels (GitHub, Gitter, Discord, IRC, mailing lists, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the Nx project to do the same.
If any member of the community violates this code of conduct, the maintainers of the Nx project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate.
If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at conduct@nrwl.io.
+74 -223
View File
@@ -6,64 +6,40 @@ We would love for you to contribute to Nx! Read this document to see how to do i
Watch this 5-minute video:
<a href="https://www.youtube.com/watch?v=8LCA_4qxc08" target="_blank" rel="noreferrer">
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/how-to-contribute.png" width="600" alt="Nx - How to contribute"></p>
<a href="https://www.youtube.com/watch?v=o11p0zSm0No&feature=youtu.be" target="_blank">
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/how-to-contribute.png" width="600"></p>
</a>
## Got a Question?
We are trying to keep GitHub issues for bug reports and feature requests. Using the `nrwl` tag
on [Stack Overflow](https://stackoverflow.com/questions/tagged/nrwl) is a much better place to ask general questions
about how to use Nx.
We are trying to keep GitHub issues for bug reports and feature requests. Using the `nrwl` tag on [Stack Overflow](https://stackoverflow.com/questions/tagged/nrwl) is a much better place to ask general questions about how to use Nx.
## Found an Issue?
If you find a bug in the source code or a mistake in the documentation, you can help us
by [submitting an issue](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-issue)
to [our GitHub Repository](https://github.com/nrwl/nx). Even better, you
can [submit a Pull Request](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr) with a fix.
If you find a bug in the source code or a mistake in the documentation, you can help us by [submitting an issue](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-issue) to [our GitHub Repository](https://github.com/nrwl/nx). Even better, you can [submit a Pull Request](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr) with a fix.
## Project Structure
Source code and documentation are included in the top-level folders listed below.
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform,
and API docs.
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform, and API docs.
- `e2e` - E2E tests.
- `packages` - Source code for Nx packages such as Angular, React, Web, NestJS, Next and others including generators and
executors (or builders).
- `packages` - Source code for Nx packages such as Angular, React, Web, NestJS, Next and others including schematics and builders.
- `scripts` - Miscellaneous scripts for project tasks such as building documentation, testing, and code formatting.
- `tmp` - Folder used by e2e tests. If you are a WebStorm user, make sure to mark this folder as excluded.
## Development Workstation Setup
If you are using `VSCode`, and provided you have [Docker](https://docker.com) installed on your machine, then you can leverage [Dev Containers](https://containers.dev) through this [VSCode extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers), to easily setup your development environment, with everything needed to contribute to Nx, already installed (namely `NodeJS`, `Yarn`, `Rust`, `Cargo`, plus some useful extensions like `Nx Console`).
To do so, simply:
- Checkout the repo
- Open it with VSCode
- Open the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and select "Dev Containers: Open Folder in Container..."
The repo comes with a preconfigured `devcontainer.json` file (located in `.devcontainer/` folder at root), that `VSCode` will automatically use to install the aforementioned tools, inside a Docker image. It will even run `pnpm install` for you, so you can start contributing to Nx right after.
If you open the repo in [Github Codespace](https://github.com/features/codespaces), it will also leverage this config file, to setup the codespace, with the same required tools.
## Building the Project
> Nx uses Rust to build native bindings for Node. Please make sure that you have Rust installed via [rustup.rs](https://rustup.rs)
> If you have VSCode + Docker, this can be automated for you, see [section](#development-workstation-setup) above
After cloning the project to your machine, to install the dependencies, run:
```bash
pnpm i
yarn
```
To build all the packages, run:
```bash
pnpm build
yarn build
```
## Publishing to a local registry
@@ -71,218 +47,116 @@ pnpm build
To test if your changes will actually work once the changes are published,
it can be useful to publish to a local registry.
Check out [this video for a live walkthrough](https://youtu.be/Tx257WpNsxc) or follow the instructions below:
Here are some useful commands for doing so:
- Run `pnpm local-registry` in Terminal 1 (keep it running)
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to
be logged in. You can use test/test/test@test.io.)
- Run `pnpm nx-release 20.0.0 --local` in Terminal 2 - you can choose any nonexistent version number here, but it's recommended to use the next major
- Run `cd ./tmp` in Terminal 2
- Run `npx create-nx-workspace@20.0.0` in Terminal 2
```bash
# Starts the local registry. Keep this running in a separate terminal.
yarn local-registry start
If you have problems publishing, make sure you use Node 18 and NPM 8.
# Set npm and yarn to use the local registry.
# Note: This reroutes your installs to your local registry
yarn local-registry enable
**NOTE:** To use this newly published local version, you need to make a new workspace, run `nx migrate` or change all of your target packages to this new version, eg: `"nx": "^20.0.0",` and re-run `pnpm i` in your testing project.
# Revert npm and yarn to use their default registries
yarn local-registry disable
```
### Publishing for Yarn 2+ (Berry)
Yarn Berry operates slightly differently than Yarn Classic. In order to publish packages for Berry follow next steps:
- Run `yarn set version berry` to switch to latest Yarn version.
- Create `.yarnrc.yml` in root with following contents:
```yml
nodeLinker: node-modules
npmRegistryServer: 'http://localhost:4873'
unsafeHttpWhitelist:
- localhost
```
- Run `pnpm local-registry` in Terminal 1 (keep it running)
- If you are creating nx workspace outside of your nx repo, make sure to add npm registry info to your root yarnrc (
usually in ~/.yarnrc.yml). The file should look something like this:
```yml
npmRegistries:
'https://registry.yarnpkg.com':
npmAuthToken: npm_******************
yarnPath: .yarn/releases/yarn-3.2.2.cjs
npmRegistryServer: 'http://localhost:4873'
unsafeHttpWhitelist:
- localhost
```
- Run `pnpm nx-release minor --local` in Terminal 2 to publish next minor version. The output will report the version of published packages.
- Go to your target folder (e.g. `cd ./tmp`) in Terminal 2
- Run `yarn dlx create-nx-workspace@123.4.5` in Terminal 2 (replace `123.4.5` with the version that got published).
You can also run `yarn test-create-nx-workspace 30.0.0`. It will set up local registry, publish the packages, create the workspace with Angular and React applications in it, and will run some basic checks against the workspace.
### Running Unit Tests
To make sure your changes do not break any unit tests, run the following:
```bash
nx affected --target=test
yarn test
```
For example, if you need to only run the tests for the jest package, run:
For example, if you need to only run the **jest-project/jest-project.spec.ts** test suite, provide a path to the specific spec file, run:
```bash
nx test jest
yarn test jest/src/schematics/jest-project/jest-project
```
### Running E2E Tests
**Use Node 18 and NPM 8. E2E tests won't work on Node 15 and NPM 7.**
To make sure your changes do not break any E2E tests, run:
```bash
nx e2e e2e-vite # or any other project here
yarn e2e
```
Running E2E tests can take some time, so it is often useful to run a single test. To run a single suite of tests, run:
```bash
nx e2e e2e-vite -t versions # I often add qqqq to my test name so I can use -t qqqq
yarn e2e affected
```
Sometimes tests pass locally but they fail on the CI. To reproduce the CI environment and be able to debug the issue, run:
The `yarn e2e` command is going to remove the `tmp` folder and will recreate the sandbox from scratch. This can take a long time. If you are working on the same e2e test, you can use `yarn e2e-rerun affected`, which is significantly faster.
### Playground
While developing you may want to try out the changes you have made. The easier way to do it is to run:
```bash
NX_VERBOSE_LOGGING=true CI=true SELECTED_PM=pnpm pnpm nx e2e e2e-vite --t="should do something is this test"
yarn create-playground
```
The above command sets verbose logging (this exposes stack traces and underlying errors), sets the defaults to be CI-like and sets Pnpm as the selected package manager.
You can then go to `tmp/nx` (this is set up to use Nx CLI) or `tmp/angular` (this is set up to use Angular CLI), where you will find an empty workspace with your changes in it.:
```bash
yarn create-playground
cd tmp/nx/proj
nx g @nrwl/express:app backend
nx build backend
```
You can fix the changed files in `tmp/nx/node_modules/@nrwl/...` and `tmp/angular/node_modules/@nrwl/...`.
### Developing on Windows
To build Nx on Windows, you need to use WSL.
- Run `pnpm install` in WSL. Yarn will compile several dependencies. If you don't run `install` in WSL, they will be
compiled for Windows.
- Run `nx affected --target=test` and other commands in WSL.
## Documentation Contributions
We would love for you to contribute to our documentation as well! Please feel welcome to submit fixes or enhancements to
our existing documentation pages and the `nx-dev` application in this repo.
### Documentation Structure
#### Documentation Pages
Our documentation pages can be found within this repo under the `docs` directory.
The `docs/map.json` file is considered our source of truth for our site's structure, and should be updated when adding a
new page to our documentation to ensure that it is included in the documentation site. We also run automated scripts
based on this `map.json` data to safeguard against common human errors that could break our site.
When you make a change to the `map.json` file, make sure to run `pnpm documentation` to propagate your changes to the `nx-dev` application.
#### Nx-Dev Application
Our public `nx.dev` documentation site is a [Next.js](https://nextjs.org/) application, that can be found in
the `nx-dev` directory of this repo.
The documentation site is consuming the `docs/` directly by copy-ing its content while deploying, so the website is
always in sync and reflects the latest version of `docs/`.
Jump to [Running the Documentation Site Locally](#running-the-documentation-site-locally) to see how to preview your
changes while serving.
### Changing Generated API documentation
`.md` files documenting the API for our CLI (including executor and generator API docs) are generated via the
corresponding `schema.json` file for the given command.
After adjusting the `schema.json` file, `.md` files for these commands can be generated by running:
```bash
pnpm documentation
```
This will update the corresponding contents of the `docs` directory. These are generated automatically on push (via
husky) as well.
Note that adjusting the `schema.json` files will also affect the CLI manuals and Nx Console behavior, in addition to
adjusting the docs.
### Running the Documentation Site Locally
To run `nx-dev` locally, run the command:
```bash
npx nx serve-docs nx-dev
```
You can then access the application locally at `localhost:4200`. Changes to markdown documentation files will be automatically applied to the site when you refresh the browser.
#### Troubleshooting: `JavaScript heap out of memory`
If you see an error that states: `FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory`,
you need
to [increase the max memory size of V8's old memory section](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes):
```bash
export NODE_OPTIONS="--max-old-space-size=4096"
```
After configuring this, try to run `npx nx serve nx-dev` again.
### PR Preview
When submitting a PR, this repo will automatically generate a preview of the `nx-dev` application based on the contents
of your pull request.
Once the preview site is launched, a comment will automatically be added to your PR with the link your PR's preview. To
check your docs changes, make sure to select `Preview` from the version selection box of the site.
- Run `yarn install` in WSL. Yarn will compile several dependencies. If you don't run `install` in WSL, they will be compiled for Windows.
- Run `yarn test` and other commands in WSL.
## Submission Guidelines
### <a name="submit-issue"></a> Submitting an Issue
Before you submit an issue, please search the issue tracker. An issue for your problem may already exist and has been
resolved, or the discussion might inform you of workarounds readily available.
Before you submit an issue, please search the issue tracker. An issue for your problem may already exist and has been resolved, or the discussion might inform you of workarounds readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. Having a
reproducible scenario gives us wealth of important information without going back and forth with you requiring
additional information, such as:
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. Having a reproducible scenario gives us wealth of important information without going back and forth with you requiring additional information, such as:
- the output of `nx report`
- `yarn.lock` or `package-lock.json` or `pnpm-lock.yaml`
- `yarn.lock` or `package-lock.json`
- and most importantly - a use-case that fails
A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are
fixing the right problem.
A minimal reproduction allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.
We will be insisting on a minimal reproduction in order to save maintainers' time and ultimately be able to fix more
bugs. Interestingly, from our experience, users often find coding problems themselves while preparing a minimal
reproduction repository. We understand that sometimes it might be hard to extract essentials bits of code from a larger
codebase, but we really need to isolate the problem before we can fix it.
We will be insisting on a minimal reproduction in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience, users often find coding problems themselves while preparing a minimal repository. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
You can file new issues by filling out our [issue form](https://github.com/nrwl/nx/issues/new/choose).
You can file new issues by filling out our [issue form](https://github.com/nrwl/nx/issues/new).
### <a name="submit-pr"></a> Submitting a PR
Please follow the following guidelines:
- Make sure unit tests pass (`nx affected --target=test`)
- Target a specific project with: `nx run proj:test` (i.e. `nx run angular:test` to target `packages/angular`)
- Target a specific unit test file (i.e. `packages/angular/src/utils/ast-command-line-utils.spec.ts`)
with `npx jest angular/src/utils/ast-utils` or `npx jest packages/angular/src/utils/ast-utils`
- For more options on running tests - check `npx jest --help` or visit [jestjs.io](https://jestjs.io/)
- Make sure unit tests pass (`yarn test`)
- Target a specific unit test (i.e. `/build/packages/angular/src/utils/ast-utils.spec.js`) with `yarn test angular/src/utils/ast-utils`
- Debug with `node --inspect-brk ./node_modules/jest/bin/jest.js build/packages/angular/src/utils/ast-utils.spec.js`
- Make sure e2e tests pass (this can take a while, so you can always let CI check those) (`nx affected --target=e2e`)
- Target a specific e2e test with `nx e2e e2e-cypress`
- Make sure you run `nx format`
- Update documentation with `pnpm documentation`. For documentation, check for spelling and grammatical errors.
- Update your commit message to follow the guidelines below (use `pnpm commit` to automate compliance)
- `pnpm check-commit` will check to make sure your commit messages are formatted correctly
- Make sure e2e tests pass (this can take a while, so you can always let CI check those) (`yarn e2e`)
- Target a specific e2e test (i.e. `/build/e2e/cypress.test.js`) with `yarn e2e cypress`
- Debug with `node --inspect-brk ./node_modules/jest/bin/jest.js build/e2e/cypress.test.js`
- Make sure you run `yarn format`
- Update documentation with `yarn documentation`. For documentation, check for spelling and grammatical errors.
- Update your commit message to follow the guidelines below (use `yarn commit` to automate compliance)
- `yarn checkcommit` will check to make sure your commit messages are formatted correctly
#### Commit Message Guidelines
The commit message should follow the following format:
```plain
```
type(scope): subject
BLANK LINE
body
@@ -292,60 +166,42 @@ body
The type must be one of the following:
- feat - New or improved behavior being introduced (e.g. Updating to new versions of React or Jest which bring in new
features)
- fix - Fixes the current unexpected behavior to match expected behavior (e.g. Fixing the library generator to create
the proper named project)
- cleanup - Code Style changes that have little to no effect on the user (e.g. Refactoring some functions into a
different file)
- docs - Changes to the documentation (e.g. Adding more details into the getting started guide)
- chore - Changes that have absolutely no effect on users (e.g. Updating the version of Nx used to build the repo)
- chore
- feat
- fix
- cleanup
- docs
##### Scope
The scope must be one of the following:
- angular - anything Angular specific
- bundling - anything bundling specific (e.g. rollup, webpack, etc.)
- bazel - anything Bazel specific
- core - anything Nx core specific
- detox - anything Detox specific
- devkit - devkit-related changes
- graph - anything graph app specific
- expo - anything Expo specific
- express - anything Express specific
- js - anything related to @nx/js package or general js/ts support
- linter - anything Linter specific
- nest - anything Nest specific
- docs - anything related to docs infrastructure
- nextjs - anything Next specific
- nest - anything Nest specific
- node - anything Node specific
- nx-cloud - anything Nx Cloud specific
- nx-plugin - anything Nx Plugin specific
- nx-dev - anything related to docs infrastructure
- linter - anything Linter specific
- react - anything React specific
- react-native - anything React Native specific
- release - anything related to nx release
- repo - anything related to managing the Nx repo itself
- storybook - anything Storybook specific
- testing - anything testing specific (e.g., Jest or Cypress)
- vite - anything Vite specific
- vue - anything Vue specific
- web - anything Web specific
- webpack - anything Webpack specific
- testing - anything testing specific (e.g., jest or cypress)
- repo - anything related to managing the repo itself
- misc - misc stuff
##### Subject and Body
The subject must contain a description of the change, and the body of the message contains any additional details to
provide more context about the change.
The subject must contain a description of the change, and the body of the message contains any additional details to provide more context about the change.
Including the issue number that the PR relates to also helps with tracking.
#### Example
```plain
feat(angular): add an option to generate lazy-loadable modules
```
feat(schematics): add an option to generate lazy-loadable modules
`nx generate lib mylib --lazy` provisions the mylib project in .eslintrc.json
`nx generate lib mylib --lazy` provisions the mylib project in tslint.json
Closes #157
```
@@ -353,9 +209,4 @@ Closes #157
#### Commitizen
To simplify and automate the process of committing with this format,
**Nx is a [Commitizen](https://github.com/commitizen/cz-cli) friendly repository**, just do `git add` and
execute `pnpm commit`.
#### PR releases
If you are working on a particularly complex change or feature addition, you can request a dedicated Nx release for the associated pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate.
**Nx is a [Commitizen](https://github.com/commitizen/cz-cli) friendly repository**, just do `git add` and execute `yarn commit`.
Generated
-3106
View File
File diff suppressed because it is too large Load Diff
-9
View File
@@ -1,9 +0,0 @@
[workspace]
resolver = '2'
members = [
'packages/nx',
]
[profile.release]
lto = true
+22 -22
View File
@@ -1,22 +1,22 @@
(The MIT License)
Copyright (c) 2017-2024 Narwhal Technologies Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
(The MIT License)
Copyright (c) 2017-2020 Narwhal Technologies Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+179 -53
View File
@@ -1,79 +1,205 @@
<p style="text-align: center;">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
<img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
</picture>
</p>
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/nx-logo.png" width="450"></p>
<div style="text-align: center;">
<div align="center">
[![CircleCI](https://circleci.com/gh/nrwl/nx.svg?style=svg)](https://circleci.com/gh/nrwl/nx)
[![License](https://img.shields.io/npm/l/nx.svg?style=flat-square)]()
[![NPM Version](https://badge.fury.io/js/nx.svg)](https://www.npmjs.com/package/nx)
[![License](https://img.shields.io/npm/l/@nrwl/workspace.svg?style=flat-square)]()
[![NPM Version](https://badge.fury.io/js/%40nrwl%2Fworkspace.svg)](https://www.npmjs.com/@nrwl/workspace)
[![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)]()
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Join the chat at https://gitter.im/nrwl-nx/community](https://badges.gitter.im/nrwl-nx/community.svg)](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the Official Nx Discord Server](https://img.shields.io/discord/1143497901675401286?label=discord)](https://go.nx.dev/community)
[![Join us @nrwl/community on slack](https://img.shields.io/badge/slack-%40nrwl%2Fcommunity-brightgreen)](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
</div>
<hr>
# Smart Monorepos · Fast CI
# What is Nx?
Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
🔎 **Extensible Dev Tools for Monorepos.**
A few links to help you get started:
## Nx Helps You
- [Nx.Dev: Documentation, Guides, Interactive Tutorials](https://nx.dev)
- [Nx.Dev: Core Tutorials](https://nx.dev/getting-started/intro)
- [Recipe: Adding Nx to an Existing Monorepo](https://nx.dev/recipes/adopting-nx/adding-to-monorepo)
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
### Use Modern Tools
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="./images/nx-courses-and-videos.svg"
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
Using Nx, you can add TypeScript, Cypress, Jest, Prettier, Angular, React, Storybook, Next.js and Nest into your dev workflow. Nx sets up these tools and allows you to use them seamlessly. Nx fully integrates with the other modern tools you already use and love.
# Engage with the Core Team and the Community
### Build Full-Stack Applications
- [Nx.Dev Community Page: Community Discord Channel, Newsletter, etc.](https://nx.dev/community)
- [The Nx Show Playlist on YouTube](https://www.youtube.com/playlist?list=PLakNactNC1dE8KLQ5zd3fQwu_yQHjTmR5). It's a
regular YouTube stream where we talk all things Nx. Join the stream, ask questions, etc.
- [Follow Nx on Twitter](https://twitter.com/NxDevTools)
With Nx, you can build full-stack applications using modern frameworks. You can share code between the frontend and the backend. And you can use the same `build/test/serve` commands throughout the whole dev experience.
### Develop like Google, Facebook, and Microsoft
With Nx, you can develop multiple full-stack applications holistically and share code between them all in the same workspace. Nx provides advanced tools which help you scale your enterprise development. Nx also helps enforce your organizations standards and community best practices.
# Getting Started
## Creating an Nx Workspace
**Using `npx`**
```bash
npx create-nx-workspace
```
**Using `npm init`**
```bash
npm init nx-workspace
```
**Using `yarn create`**
```bash
yarn create nx-workspace
```
If it's your first Nx project, the command will recommend you to install `@nrwl/cli` globally, so you can invoke `nx` directly without going through yarn or npm.
## Creating First Application
By default, an Nx workspace starts blank. There are no applications to build, serve, and test. To create one, you need to add capabilities to the workspace.
**To add a web components app, run:**
```bash
yarn add --dev @nrwl/web
nx g @nrwl/web:app myapp # or just "nx g myapp"
```
```bash
npm install --save-dev @nrwl/web
nx g @nrwl/web:app myapp # or just "nx g myapp"
```
**To add an Angular app, run:**
```bash
yarn add --dev @nrwl/angular
nx g @nrwl/angular:app myapp # or just "nx g myapp"
```
```bash
npm install --save-dev @nrwl/angular
nx g @nrwl/angular:app myapp # or just "nx g myapp"
```
**To add a React app, run:**
```bash
yarn add --dev @nrwl/react
nx g @nrwl/react:app myapp # or just "nx g myapp"
```
```bash
npm install --save-dev @nrwl/react
nx g @nrwl/react:app myapp # or just "nx g myapp"
```
If `nx g` fails, use: `yarn nx g @nrwl/web:app myapp` or `npm run nx -- g @nrwl/web:app myapp`.
Regardless of what framework you chose, the resulting file tree will look like this:
```treeview
<workspace name>/
├── apps/
│   ├── myapp/
│   └── myapp-e2e/
├── libs/
├── tools/
├── nx.json
├── package.json
├── tsconfig.json
└── tslint.json
```
## Serving Application
- Run `nx serve myapp` to serve the newly generated application!
- Run `nx test myapp` to test it.
- Run `nx e2e myapp-e2e` to run e2e tests for it.
Angular users can also run `ng g/serve/test/e2e`.
You are good to go!
### Documentation
- [Nx Documentation and Guides](https://nx.dev)
- [Nx blog posts](https://blog.nrwl.io/nx/home)
### Quick Start Videos
<table>
<tr>
<td>
<a href="https://www.youtube.com/watch?v=mVKMse-gFBI" target="_blank">
<p align="center">Angular<br><img src="https://raw.githubusercontent.com/nrwl/nx/master/nx-angular-video.png" width="350"></p>
</a>
</td>
<td>
<a href="https://www.youtube.com/watch?v=E188J7E_MDU" target="_blank">
<p align="center">React<br><img src="https://raw.githubusercontent.com/nrwl/nx/master/nx-react-video.png" width="350"></p>
</a>
</td>
</tr>
</table>
### Courses
<table>
<tr>
<td>
<a href="https://www.youtube.com/watch?v=2mYLe9Kp9VM&list=PLakNactNC1dH38AfqmwabvOszDmKriGco" target="_blank">
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/nx-workspace-course.png" width="350"></p>
</a>
</td>
<td>
<a href="https://nxplaybook.com/p/advanced-nx-workspaces" target="_blank">
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/advanced-nx-workspace-course.png" width="350"></p>
</a>
</td>
</tr>
</table>
### Books
- [Effective React Development with Nx](https://go.nrwl.io/effective-react-development-with-nx-new-book)
- [Angular Enterprise Monorepo Patterns](https://go.nrwl.io/angular-enterprise-monorepo-patterns-new-book?utm_campaign=Book%3A%20Monorepo%20Patterns%2C%20Jan%202019&utm_source=Github&utm_medium=Banner%20Ad)
### Videos
- [Building Angular full-stack applications in a monorepo.](https://www.youtube.com/watch?v=XZpp52IqD2A&t=1292s)
- [Building React full-stack applications in a monorepo.](https://www.youtube.com/watch?v=Jxh_--FeJeY&t=2s)
### Talks
- [Angular at Large Organizations](https://www.youtube.com/watch?v=piQ0EZhtus0)
- [Nx: The New Way to Build Enterprise Angular Apps](https://www.youtube.com/watch?v=xo-1SDmvM8Y)
- [Supercharging the Angular CLI](https://www.youtube.com/watch?v=bMkKz8AedHc)
- [Hands on Full Stack development with Nx and Bazel](https://www.youtube.com/watch?v=1KDDIhcQORM)
## Misc
- [nx-examples](https://github.com/nrwl/nx-examples) repo has branches for different nx comments to display expected behavior and example app and libraries. Check out the branch (workspace, ngrx...) to see what gets created for you. More info on readme.
- [xplat - Cross-platform tools for Nx workspaces](https://nstudio.io/xplat/)
## Want to help?
If you want to file a bug or submit a PR, read up on
our [guidelines for contributing](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md) and watch this video that will
help you get started.
If you want to file a bug or submit a PR, read up on our [guidelines for contributing](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md) and watch this video that will help you get started.
<a href="https://www.youtube.com/watch?v=8LCA_4qxc08" target="_blank" rel="noreferrer">
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/how-to-contribute.png" width="600" alt="Nx - How to contribute video"></p>
<a href="https://www.youtube.com/watch?v=o11p0zSm0No&feature=youtu.be" target="_blank">
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/how-to-contribute.png" width="600"></p>
</a>
## Core Team
| Victor Savkin | Jason Jean | Benjamin Cabanes | Jack Hsu |
| ---------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| ![Victor Savkin](https://avatars1.githubusercontent.com/u/35996?s=160) | ![Jason Jean](https://avatars2.githubusercontent.com/u/8104246?s=160) | ![Benjamin Cabanes](https://avatars2.githubusercontent.com/u/3447705?s=160) | ![Jack Hsu](https://avatars0.githubusercontent.com/u/53559?s=160) |
| [vsavkin](https://github.com/vsavkin) | [FrozenPandaz](https://github.com/FrozenPandaz) | [bcabanes](https://github.com/bcabanes) | [jaysoo](https://github.com/jaysoo) |
| Victor Savkin | Jason Jean | Benjamin Cabanes | Brandon Roberts |
| ---------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| ![Victor Savkin](https://avatars1.githubusercontent.com/u/35996?s=150) | ![Jason Jean](https://avatars2.githubusercontent.com/u/8104246?s=150) | ![Benjamin Cabanes](https://avatars2.githubusercontent.com/u/3447705?s=150) | ![Brandon Roberts](https://avatars1.githubusercontent.com/u/42211?s=150) |
| [vsavkin](https://github.com/vsavkin) | [FrozenPandaz](https://github.com/FrozenPandaz) | [bcabanes](https://github.com/bcabanes) | [brandonroberts](https://github.com/brandonroberts) |
| Jo Hanna Pearce | Jon Cammisuli | Isaac Mann | Juri Strumpflohner |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| ![Jo Hanna Pearce](https://avatars1.githubusercontent.com/u/439121?s=160) | ![Jon Cammisuli](https://avatars2.githubusercontent.com/u/4332460?s=160) | ![Isaac Mann](https://avatars1.githubusercontent.com/u/861504?s=160) | ![Juri Strumpflohner](https://avatars1.githubusercontent.com/u/542458?s=160) |
| [jdpearce](https://github.com/jdpearce) | [cammisuli](https://github.com/cammisuli) | [isaacplmann](https://github.com/isaacplmann) | [juristr](https://github.com/juristr) |
| Philip Fulcher | Caleb Ukle | Katerina Skroumpelou | Colum Ferry |
| ------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| ![Philip Fulcher](https://avatars1.githubusercontent.com/u/1536471?s=160) | ![Caleb Ukle](https://avatars.githubusercontent.com/u/23272162?s=160) | ![Katerina Skroumpelou](https://avatars0.githubusercontent.com/u/6603745?s=160) | ![Colum Ferry](https://avatars.githubusercontent.com/u/12140467?s=160) |
| [philipjfulcher](https://github.com/philipjfulcher) | [barbados-clemens](https://github.com/barbados-clemens) | [mandarini](https://github.com/mandarini) | [Coly010](https://github.com/Coly010) |
| Emily Xiong | Miroslav Jonaš | Leosvel Pérez Espinosa | Zachary DeRose |
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| ![Emily Xiong](https://avatars.githubusercontent.com/u/16211801?s=160) | ![Miroslav Jonaš](https://avatars.githubusercontent.com/u/881612?s=160) | ![Leosvel Pérez Espinosa](https://avatars.githubusercontent.com/u/12051310?s=160) | ![Zachary DeRose](https://avatars.githubusercontent.com/u/3788405?s=160) |
| [xiongemi](https://github.com/xiongemi) | [meeroslav](https://github.com/meeroslav) | [leosvelperez](https://github.com/leosvelperez) | [ZackDeRose](https://github.com/ZackDeRose) |
| Craigory Coppola | Chau Tran | Nicholas Cunningham | Max Kless |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| ![Craigory Coppola](https://avatars.githubusercontent.com/u/6933928?s=160) | ![Chau Tran](https://avatars.githubusercontent.com/u/25516557?s=160) | ![Nicholas Cunningham](https://avatars.githubusercontent.com/u/338948?s=160) | ![Max Kless](https://avatars.githubusercontent.com/u/34165455?s=160) |
| [AgentEnder](https://github.com/AgentEnder) | [nartc](https://github.com/nartc) | [ndcunningham](https://github.com/ndcunningham) | [MaxKless](https://github.com/MaxKless) |
| Jack Hsu | Jo Hanna Pearce | Matt Briggs |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| ![Jack Hsu](https://avatars0.githubusercontent.com/u/53559?s=150&v=4) | ![Jo Hanna Pearce](https://avatars1.githubusercontent.com/u/439121?s=150&v=4) | ![Matt Briggs](https://avatars2.githubusercontent.com/u/89260?s=150&v=4) |
| [jaysoo](https://github.com/jaysoo) | [jdpearce](https://github.com/jdpearce) | [mbriggs](https://github.com/mbriggs) |

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

-3
View File
@@ -1,3 +0,0 @@
{
"babelrcRoots": ["*"]
}
+16 -471
View File
@@ -1,492 +1,37 @@
[
{
"name": "@ahryman40k/nx-vitepress",
"description": "Nx plugin add vitepress project to your workspace",
"url": "https://github.com/Ahryman40k/nx-vitepress/tree/main/packages/nx-vitepress"
},
{
"name": "@nightwatch/nx",
"description": "The NightwatchJS plugin allows your workspace to use the power of NightwatchJS for E2E and Component Testing on Desktop and Mobile",
"url": "https://github.com/nightwatchjs/nightwatch-plugin-nx/"
},
{
"name": "@nxkit/playwright",
"description": "The Playwright plugin allows your workspace to use the power of Playwright end-to-end testing",
"url": "https://github.com/nxkit/nxkit"
},
{
"name": "qwik-nx",
"description": "Get first class support for Qwik inside of Nx monorepos with Qwik optimized custom executors, generators and a vite plugin",
"url": "https://github.com/qwikifiers/qwik-nx"
},
{
"name": "@nxkit/style-dictionary",
"description": "Nx plugin to generate and build Style Dictionary projects inside your Nx workspace",
"url": "https://github.com/nxkit/nxkit"
},
{
"name": "nx-plugin-vite",
"description": "Nx plugin integrations with Vite.",
"url": "https://nx-plugins.netlify.app/"
},
{
"name": "nx-serverless-cdk",
"description": "Create CDK applications and construct libraries. Test and debug infrastructure code and AWS Lambda functions locally.",
"url": "https://github.com/castleadmin/nx-plugins/tree/main/nx-serverless-cdk/plugin"
},
{
"name": "@ago-dev/nx-aws-cdk-v2",
"description": "An nx plugin for the aws-cdk v2.",
"url": "https://github.com/adrian-goe/nx-aws-cdk-v2"
},
{
"name": "@berenddeboer/nx-aws-cdk",
"description": "Nx plugin to generate a CDK stack with support for the vitest runner. Supports all CDK commands.",
"url": "https://github.com/berenddeboer/nx-plugins/tree/main/packages/nx-aws-cdk"
},
{
"name": "@nx-iac/aws-cdk",
"description": "Empowers your Nx workspace with AWS CDK capabilities ⚡",
"url": "https://github.com/joelklint/nx-aws-cdk"
},
{
"name": "@routineless/nx-aws-cdk",
"description": "Nx plugin to generate and manage aws cdk app and lambdas.",
"url": "https://github.com/KozelAnatoliy/routineless/tree/main/packages/nx-aws-cdk"
},
{
"name": "@berenddeboer/nx-sst",
"description": "Nx plugin to generate an SST stack and execute all SST commands.",
"url": "https://github.com/berenddeboer/nx-plugins/tree/main/packages/nx-sst"
},
{
"name": "@rxap/plugin-localazy",
"description": "An Nx plugin for localazy.com upload and download tasks.",
"url": "https://gitlab.com/rxap/plugins/-/tree/master/libs/localazy"
},
{
"name": "nx-electron",
"description": "An Nx plugin for developing Electron applications",
"url": "https://github.com/bennymeg/nx-electron"
},
{
"name": "nx-stylelint",
"description": "Nx plugin to use stylelint in a nx workspace",
"url": "https://github.com/Phillip9587/nx-stylelint"
},
{
"name": "@nxext/ionic-react",
"name": "@nxtend/ionic-react",
"description": "An Nx plugin for developing Ionic React applications and libraries",
"url": "https://github.com/nxext/nx-extensions-ionic/tree/main/packages/ionic-react"
},
{
"name": "@nxext/ionic-angular",
"description": "An Nx plugin for developing Ionic Angular applications and libraries",
"url": "https://github.com/nxext/nx-extensions-ionic/tree/main/packages/ionic-angular"
},
{
"name": "@nxext/capacitor",
"description": "An Nx plugin for developing cross-platform applications using Capacitor",
"url": "https://github.com/nxext/nx-extensions/tree/main/packages/capacitor"
"url": "https://github.com/devinshoemaker/nxtend"
},
{
"name": "@angular-architects/ddd",
"description": "Nx plugin for structuring a monorepo with domains and layers",
"url": "https://github.com/angular-architects/nx-ddd-plugin"
},
{
"name": "@offeringsolutions/nx-karma-to-jest",
"description": "Nx plugin for replacing karma with jest in an Nx workspace",
"url": "https://github.com/FabianGosebrink/nx-karma-to-jest"
},
{
"name": "@flowaccount/nx-serverless",
"description": "Nx plugin for node/angular-universal schematics and deployment builders in an Nx workspace",
"url": "https://github.com/flowaccount/nx-plugins"
},
{
"name": "@ns3/nx-serverless",
"description": "Nx plugin for node serverless applications in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-serverless"
"name": "@dev-thought/nx-deploy-it",
"description": "Nx plugin to deploy applications on your favorite cloud provider",
"url": "https://github.com/Dev-Thought/nx-plugins/tree/master/libs/nx-deploy-it"
},
{
"name": "@ns3/nx-jest-playwright",
"description": "Nx plugin to run jest-playwright e2e tests in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-jest-playwright"
"name": "@offeringsolutions/nx-protractor-to-cypress",
"description": "Nx plugin to replace protractor with cypress in an nx workspace",
"url": "https://github.com/FabianGosebrink/nx-protractor-to-cypress"
},
{
"name": "@ns3/nx-playwright",
"description": "Nx plugin to run playwright e2e tests in an Nx workspace",
"url": "https://github.com/Bielik20/nx-plugins/tree/master/packages/nx-playwright"
},
{
"name": "@nx-plus/nuxt",
"description": "Nx plugin adding first class support for Nuxt in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/nuxt"
},
{
"name": "@nx-plus/vue",
"description": "Nx plugin adding first class support for Vue in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/vue"
},
{
"name": "@nx-plus/docusaurus",
"description": "Nx plugin adding first class support for Docusaurus in your Nx workspace.",
"url": "https://github.com/ZachJW34/nx-plus/tree/master/libs/docusaurus"
},
{
"name": "@twittwer/compodoc",
"description": "Nx Plugin to integrate the generation of documentation with Compodoc in the Nx workflow",
"url": "https://github.com/twittwer/nx-tools/tree/master/libs/compodoc#readme"
},
{
"name": "@enio.ai/nx-install",
"description": "nx-install is a plugin for Nx workspaces to quickly setup custom install commands via npm.",
"url": "https://github.com/enio-ireland/enio/tree/develop/packages/nx-install#readme"
},
{
"name": "@enio.ai/typedoc",
"description": "typedoc is a plugin for Nx workspaces to quickly setup documentation automation on your projects using typedoc.",
"url": "https://github.com/enio-ireland/enio/tree/develop/packages/typedoc#readme"
},
{
"name": "@nxext/svelte",
"description": "Nx plugin to use Svelte within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/svelte"
},
{
"name": "@nxext/stencil",
"description": "Nx plugin to use StencilJs within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/stencil"
},
{
"name": "@nxext/vue",
"description": "Nx plugin to use VueJS 3 within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/vue"
},
{
"name": "@nxext/solid",
"description": "Nx plugin to use SolidJS within nx workspaces",
"url": "https://github.com/nxext/nx-extensions/tree/master/packages/solid"
},
{
"name": "@nx-go/nx-go",
"description": "Nx plugin to use Go in a Nx workspace",
"url": "https://github.com/nx-go/nx-go"
},
{
"name": "@nx-golang/gin",
"description": "Nx plugin to use Go-Gin in a Nx workspace",
"url": "https://github.com/nx-golang/nx-golang"
},
{
"name": "@angular-architects/module-federation",
"description": "Nx plugin to use webpack module federation",
"url": "https://github.com/angular-architects/module-federation-plugin"
},
{
"name": "@nxrocks/nx-spring-boot",
"description": "Nx plugin to generate, run, package, build (and more) Spring Boot projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-spring-boot"
},
{
"name": "@trumbitta/nx-plugin-openapi",
"description": "OpenAPI Plugin for Nx. Keep your API spec files in libs, and auto-generate sources.",
"url": "https://github.com/trumbitta/nx-trumbitta/tree/main/packages/nx-plugin-openapi"
},
{
"name": "@trumbitta/nx-plugin-unused-deps",
"description": "Check the dependency graph of your monorepo, looking for unused NPM packages.",
"url": "https://github.com/trumbitta/nx-trumbitta/tree/main/packages/nx-plugin-unused-deps"
},
{
"name": "@nxrocks/nx-flutter",
"description": "Nx Plugin adding first class support for Flutter in your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-flutter"
},
{
"name": "@srleecode/domain",
"description": "Nx Plugin for allowing operations to occur at the domain level instead of the default library level",
"url": "https://github.com/srlee309/domain"
},
{
"name": "@jscutlery/semver",
"description": "Nx plugin to automate semantic versioning and CHANGELOG generation.",
"url": "https://github.com/jscutlery/semver"
},
{
"name": "ngx-deploy-npm",
"description": "Publish your libraries to NPM with just one command.",
"url": "https://github.com/bikecoders/ngx-deploy-npm"
},
{
"name": "@nx-dotnet/core",
"description": "Nx plugin for developing and housing .NET projects within an Nx workspace.",
"url": "https://github.com/nx-dotnet/nx-dotnet"
},
{
"name": "@nxrocks/nx-quarkus",
"description": "Nx plugin to generate, run, package, build (and more) Quarkus projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-quarkus"
},
{
"name": "@nx-extend/gcp-secrets",
"description": "Nx plugin to generate and securely deploy your Google Cloud Secrets",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-secrets"
},
{
"name": "@nx-extend/gcp-storage",
"description": "Nx plugin to upload to Google Cloud Storage",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-storage"
},
{
"name": "@nx-extend/gcp-functions",
"description": "Nx plugin to generate, run, build and deploy your Google Cloud Functions",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-functions"
},
{
"name": "@nx-extend/gcp-deployment-manager",
"description": "Nx plugin to deploy your Google Cloud Deployments",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-deployment-manager"
},
{
"name": "@nx-extend/gcp-cloud-run",
"description": "Nx plugin to build and deploy your docker container to Google Cloud Run",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/gcp-cloud-run"
},
{
"name": "@nx-extend/translations",
"description": "Nx plugin to extract, pull, push and translate your apps translations",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/translations"
},
{
"name": "@nx-extend/firebase-hosting",
"description": "Nx plugin to deploy your apps to Firebase hosting",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/firebase-hosting"
},
{
"name": "@nx-extend/e2e-runner",
"description": "Nx plugin that can start your API before running Cypress/Playwright",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/e2e-runner"
},
{
"name": "@nx-extend/vercel",
"description": "Nx plugin to deploy your apps to Vercel",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/vercel"
},
{
"name": "@nx-extend/strapi",
"description": "Nx plugin for developing Strapi applications",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/strapi"
},
{
"name": "@nx-extend/playwright",
"description": "Nx plugin to run playwright e2e tests in an Nx workspace",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/playwright"
},
{
"name": "@nx-extend/terraform",
"description": "Nx plugin for deploying your resources with Terraform",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/terraform"
},
{
"name": "@nx-extend/pulumi",
"description": "Nx plugin for deploying your resources with Pulumi",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/pulumi"
},
{
"name": "@nx-extend/react-email",
"description": "Nx plugin for developing email templates with react.email",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/react-email"
},
{
"name": "@nx-extend/shadcn-ui",
"description": "Nx plugin for working with shadcn/ui",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/shadcn-ui"
},
{
"name": "@nx-extend/docusaurus",
"description": "Nx plugin adding first class support for Docusaurus in your Nx workspace.",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/docusaurus"
},
{
"name": "@nativescript/nx",
"description": "Nx Plugin adding first class support for NativeScript in your Nx workspace",
"url": "https://github.com/nativescript/nx"
},
{
"name": "@nxtensions/astro",
"description": "Nx plugin adding first class support for Astro (https://astro.build).",
"url": "https://github.com/nxtensions/nxtensions/tree/main/packages/astro"
},
{
"name": "@nxrs/cargo",
"description": "Nx plugin adding first-class support for Rust applications and libraries.",
"url": "https://github.com/nxrs/cargo/tree/main/packages/cargo"
},
{
"name": "nx-uvu",
"description": "An nx executor for the uvu test library",
"url": "https://github.com/jmcdo29/nx-uvu"
},
{
"name": "@ndrsg/nx-http",
"description": "Plugin with executors, which can perform http-stuff (e.g. requests, webhooks, file up/downloads, ...)",
"url": "https://github.com/ndrsg/nx-ext/tree/main/packages/nx-http"
},
{
"name": "@diogovcs/graphql-mesh",
"description": "Nx plugin to add GraphQL Mesh integration to Nx Workspace.",
"url": "https://github.com/DiogoVCS/nx-workspace-plugins"
},
{
"name": "@computas/nx-yarn",
"description": "A plugin to help make nx with yarn a pleasant experience.",
"url": "https://github.com/computas/nx-yarn"
},
{
"name": "@theunderscorer/nx-semantic-release",
"description": "Nx plugin for automated releases using semantic-release.",
"url": "https://github.com/TheUnderScorer/nx-semantic-release"
},
{
"name": "nx-pwm",
"description": "Nx plugin and CLI to help maintain packages, inspired by NX repo tooling",
"url": "https://github.com/gioragutt/nx-pwm"
},
{
"name": "@nxrocks/nx-micronaut",
"description": "Nx plugin to generate, run, package, build (and more) Micronaut projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-micronaut"
},
{
"name": "@koliveira15/nx-sonarqube",
"description": "Nx plugin that scans projects using SonarQube / SonarCloud.",
"url": "https://github.com/koliveira15/nx-sonarqube"
},
{
"name": "@mands/nx-playwright",
"description": "The Playwright plugin allows your workspace to use the power of Playwright end-to-end testing using a native runner.",
"url": "https://github.com/marksandspencer/nx-plugins/tree/main/packages/nx-playwright"
},
{
"name": "@diogovcs/stryker-mutator",
"description": "Nx plugin to add Stryker Mutator mutation tests to the Nx Workspace.",
"url": "https://github.com/DiogoVCS/nx-workspace-plugins"
},
{
"name": "@spaceribs/nx-web-ext",
"description": "Nx plugin that allows you to build, test and deploy web extensions.",
"url": "https://github.com/spaceribs/spaceribs/tree/main/packages/nx-web-ext"
},
{
"name": "@spaceribs/nx-betterer",
"description": "Nx plugin that applies betterer standards on a per-project basis.",
"url": "https://github.com/spaceribs/spaceribs/tree/main/packages/nx-betterer"
},
{
"name": "@nx-tools/nx-container",
"description": "Nx plugin to build OCI containers with Docker, Podman or Kaniko.",
"url": "https://github.com/gperdomor/nx-tools/tree/main/packages/nx-container"
},
{
"name": "@nxrocks/nx-melos",
"description": "Nx plugin adding first class support for Melos in your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-melos"
},
{
"name": "@monodon/rust",
"description": "Adds Cargo and Rust support",
"url": "https://github.com/cammisuli/monodon/tree/main/packages/rust"
},
{
"name": "nx-mesh",
"description": "GraphQL Mesh support for Nx",
"url": "https://github.com/domjtalbot/nx-mesh"
},
{
"name": "@nxazure/func",
"description": "Nx plugin to add Azure Functions support to Nx Workspace.",
"url": "https://github.com/AlexPshul/nxazure/tree/master/packages/func"
},
{
"name": "@rbnx/webdriverio",
"description": "A Nx plugin that adds the WebdriverIO testing framework to a NX workspace.",
"url": "https://github.com/Roozenboom/rbnx/tree/main/packages/webdriverio"
},
{
"name": "nx-ngrok",
"description": "Ngrok support for Nx",
"url": "https://github.com/domjtalbot/nx-ngrok"
},
{
"name": "@nxrocks/nx-ktor",
"description": "Nx plugin to generate, run, package, build (and more) Ktor projects inside your Nx workspace",
"url": "https://github.com/tinesoft/nxrocks/tree/master/packages/nx-ktor"
},
{
"name": "nx-size-limit",
"description": "Adds size-limit support for Nx (performance budget tool for JavaScript)",
"url": "https://github.com/LironHazan/nx-size-limit"
},
{
"name": "@loft-orbital/terraform",
"description": "Terraform executors and generators",
"url": "https://github.com/loft-orbital/nx-plugins/tree/main/packages/terraform"
},
{
"name": "@nxlv/python",
"description": "Nx plugin designed to extend the Nx features to work with Python projects based on Poetry.",
"url": "https://github.com/lucasvieirasilva/nx-plugins/tree/main/packages/nx-python"
},
{
"name": "nx-gcp-cache",
"description": "Nx plugin to use Google Cloud Storage as distributed remote cache",
"url": "https://github.com/davidgarciab/nx-gcp-cache"
},
{
"name": "@jnxplus/nx-gradle",
"description": "Nx plugin to add Gradle multi-project builds support to Nx workspace",
"url": "https://github.com/khalilou88/jnxplus/tree/main/packages/nx-gradle"
},
{
"name": "@jnxplus/nx-maven",
"description": "Nx plugin to add Maven multi-module project support to Nx workspace",
"url": "https://github.com/khalilou88/jnxplus/tree/main/packages/nx-maven"
},
{
"name": "@naxodev/nx-cloudflare",
"description": "Nx plugin for Cloudflare, in particular Cloudflare workers. It allows to generate build and run Cloudflare workers in your Nx workspace.",
"url": "https://github.com/naxodev/oss/tree/main/packages/plugins/nx-cloudflare"
},
{
"name": "@ziacik/azure-func",
"description": "Generating, serving and publishing Azure Functions 4 apps.",
"url": "https://github.com/ziacik/nx-tools/tree/master/packages/azure-func"
},
{
"name": "@simondotm/nx-firebase",
"description": "Nx plugin to support Firebase Apps and Cloud Functions in Nx workspaces",
"url": "https://github.com/simondotm/nx-firebase"
},
{
"name": "@dman926/nx-python-pdm",
"description": "Use Python in NX workspaces with PDM",
"url": "https://github.com/dman926/nx-python-pdm"
},
{
"name": "@gnuechtel/nx-cucumber",
"description": "Plugin to use Cucumber within Nx workspaces",
"url": "https://gitlab.com/gnuechtel/open-source/-/tree/main/libs/nx-cucumber"
},
{
"name": "@analogjs/platform",
"description": "Official plugin to add Analog to your Nx monorepo.",
"url": "https://analogjs.org/docs/integrations/nx"
},
{
"name": "@getlarge/nx-heroku",
"description": "Plugin to deploy and promote Nx apps on Heroku",
"url": "https://github.com/getlarge/nx-heroku"
},
{
"name": "@huge-nx/conventions",
"description": "Plugin to generate and manage Nx workspaces by adhering to established workspace conventions.",
"url": "https://github.com/jogelin/huge-nx"
"name": "@gperdomor/nx-docker",
"description": "Nx plugin to build docker images of your affected apps",
"url": "https://github.com/gperdomor/nx-tools/tree/master/libs/nx-docker"
}
]
-429
View File
@@ -1,429 +0,0 @@
# Documentation
## Structure of the Documentation
When writing documentation, it is important to know the audience you are writing for and what kind of document you are writing. We try to follow the framework listed below, but there are always some exceptions since the documentation is always changing. This framework is valuable to keep in mind, but we also follow the principle that if a PR is better than the existing content on the site, we'll merge it in and follow up to make it better later if it doesn't perfectly match the standards.
### Types of Documents
We are generally following the [Diataxis](https://diataxis.fr) model where documents are divided into tutorials, concept guides, recipes and reference.
- Tutorial - Focused on explaining a concept through step by step instructions.
- Concept guide - Explains why something works the way it does or how to think about something.
- Recipe - Focused directions to accomplish a specific task. Describes how to do something.
- Reference - Lists what you can do with the tool (i.e. API docs).
### Audiences
We also have different audiences in mind when writing docs:
👶 New user starting from scratch
- They know their framework of choice
- They have probably heard the term monorepo but don't really know what it is
- They're smart and eager to learn
👶 New user migrating an existing repo
- They know their framework of choice
- They know how npm workspaces work
- They're smart and eager to learn
👦 Intermediate User
- They know how to create an Nx repo or add Nx to an existing repo
- They have heard the terms integrated and package-based
- They know what a project is and how to make one
- They understand how to run a task and the basics of caching
- They can launch the graph
- They know that it is possible to enforce project boundaries
👨‍🦳 Advanced User
- They know everything about Nx except the specific piece of knowledge that is being taught by this document.
### Outline
- Getting Started - These documents assume a new user and are generally concept guides with a lot of links to other parts of the site. There are some elements of recipes mixed in, but those should be kept to a minimum.
- Tutorials - These are tutorials written for a new user. After completing one of these tutorials, the user should have enough knowledge to be an intermediate user.
- Core Features - These are primarily recipes with a little concept mixed in. These documents should be short and provide the basic information that people will want 80% of the time and link to anything more complex. A new user should be able to click through these documents and skim them to get a good understanding of what Nx does without getting overwhelmed with details.
- Concepts - These are concept guides written for a new user. Any recipe content should be split into a recipe document and linked.
- More Concepts (or other categories under Concepts) - These are concept guides written for an intermediate user.
- Recipes - These are recipes written for an advanced user.
- Nx with Your Favorite Tech - These are tutorials written for an intermediate user.
- Benchmarks - Reference documents linking to external resources.
- Reference - Reference documents.
## Markdown syntax available
The default markdown syntax is supported when writing documentation.
### Front matter
Front matter is used to add metadata to your Markdown file (`title` & `description`). It is provided at the very top of the file, enclosed by three dashes `---`. The content is parsed as `YAML`.
If no Front matter is detected, the metadata will be populated with the following:
- `title`: first main title detected
- `description`: first paragraph detected
```markdown
---
title: This is a custom title
description: This is a custom description
---
```
### Social Media Images
You can specify a custom social media image for a page by specifying `mediaImage` in the `map.json` entry for that page. `mediaImage` is a path relative to `/docs`.
Note that you won't see the social media image in the preview generated for your PR, because it loads from the live `nx.dev` site. You can make sure the image is correct by looking at `[preview-url]/images/open-graph/[page-url].[image-extension]`.
### Custom markdown syntax
The documentation website [nx.dev](https://nx.dev) is using custom Markdown syntax to enable the authors to add functionality to its content.
#### Callouts
Callouts are available to get the attention of the reader on some specific type of information.
```markdown
{% callout type="caution|check|note|warning" title="string" %}
Your content goes here.
{% /callout %}
```
#### Disclosure
A disclosure can be used for less important information that is initially collapsed.
```markdown
{% disclosure title="string" %}
Your content goes here.
{% /disclosure %}
```
#### Cards
Cards allow showing content in a grid system with a title, a description, a type and an url (internal/external).
```markdown
{% cards %}
{% card title="string" description="string" type="documentation|external|video" url="string" /%}
{% card title="string" description="string" type="documentation|external|video" url="string" /%}
// as many as cards you want
{% /cards %}
```
Title cards allow to only show a title in a card with a title and an url.
```markdown
{% cards cols="4" %}
{% title-card title="string" url="string" /%}
{% title-card title="string" url="string" /%}
{% title-card title="string" url="string" /%}
{% title-card title="string" url="string" /%}
{% /cards %}
```
#### Code
You can add specific languages and a filename on the code snippet displayed.
````
```javascript {% fileName="main.js" %}
const code = "goes here";
```
````
#### Line Highlighting
You can define groups of lines that can be interactively highlighted to illustrate a point.
````
```javascript {% lineGroups={ first:[2,3],second:[4,5] } %}
const code = "goes here";
This is in the first group
This is also in the first group
This is in the second group
This is also in the second group
```
````
The line groups can be highlighted using a button on the code fence itself, or by clicking on a link that you provide that changes the url fragment.
For example:
```
[This will highlight the first group.](#first)
```
You can also statically highlight a set of lines (the user won't be able to change what is highlighted):
````
```javascript {% highlightLines=[2,3] %}
const code = "goes here";
This is highlighted
This is also highlighted
This is not highlighted
Neither is this
```
````
You can also specify ranges like `highlightLines=[2,3,"8-10"]`.
#### Terminal command
To display a terminal command, use:
````
```shell
npx nx build
```
````
#### Terminal Output
You can display your terminal output with a dedicated component the same way you would show code.
````
``` {% command="node index.js" %}
My terminal output here!
```
````
You can optionally also pass a `path` like
````
``` {% command="node index.js" path="~/myorg" %}
My terminal output here!
```
````
#### Terminal Video Output
You can have a more dynamic visualization of a terminal output by using the following component:
```
{% terminal-video src="/documentation/shared/images/caching/cache-terminal-animation.mp4" /%}
```
#### Custom iframes
We can display a special iframe and setting its width inside the document.
```markdown
{% iframe
src="https://staging.nx.app/orgs/62d013d4d26f260059f7765e/workspaces/62d013ea0852fe0a2df74438?hideHeader=true"
title="Nx Cloud dashboard"
width="100%" /%}
```
If the type of the card is set to `type="video"` the `url` is a valid YouTube url, then the card will show a thumbnail of the video.
#### GitHub repositories
We can display a special button inviting the reader to go to a GitHub repository.
```markdown
{% github-repository url="https://github.com/nrwl/nx-examples" /%}
```
#### Stackblitz Buttons
You can add an "open in stackblitz" button as follows:
```markdown
{% stackblitz-button url="github.com/nrwl/nx-recipes/tree/main/angular-standalone?file=README.md" /%}
```
#### Install Nx Console
We can display a special button inviting the reader to go to a VSCode marketplace to install the official Nx plugin.
```markdown
{% install-nx-console /%}
```
#### Side by side
You can show content in a grid of 2 columns, via the `side-by-side` shortcode.
```markdown
{% side-by-side %}
You first content is here.
You second content is over here. _Note the space in between._
{% /side-by-side %}
```
#### Tabs
You can display multiple related information via a tabbing system.
```markdown
{% tabs %}
{% tab label="npm" %}
NPM related information.
{% /tab %}
{% tab label="yarn" %}
Yarn related information.
{% /tab %}
{% /tabs %}
```
##### Youtube
Embed a YouTube video directly with the following shortcode, control the title and the associated width. `src` can be the Youtube URL from the browser, the "share" button (short YT url) or the embed URL.
```markdown
{% youtube
src="https://www.youtube.com/embed/rNImFxo9gYs"
title="Nx Console Run UI Form"
width="100%" /%}
```
#### Youtube Section Link
Have a more decent button-like widget that you can place below sections of a tutorial with a link to a specific point in a Youtube video.
```markdown
{% video-link link="https://youtu.be/OQ-Zc5tcxJE?t=64" /%}
```
#### Project Details View
Embed a Project Details View that is identical what is shown in Nx Console or `nx show project myproject --web`
````markdown
{% project-details title="Test" height="100px" %}
```json
{
"project": {
"name": "demo",
"data": {
"root": " packages/demo",
"projectType": "application",
"targets": {
"dev": {
"executor": "nx:run-commands",
"options": {
"command": "vite dev"
}
},
"build": {
"executor": "nx:run-commands",
"inputs": ["production", "^production"],
"outputs": ["{projectRoot}/dist"],
"options": {
"command": "vite build"
}
}
}
}
},
"sourceMap": {
"targets": ["packages/demo/vite.config.ts", "@nx/vite"],
"targets.dev": ["packages/demo/vite.config.ts", "@nx/vite"],
"targets.build": ["packages/demo/vite.config.ts", "@nx/vite"]
}
}
```
{% /project-details %}
````
#### Graph
Embed an Nx Graph visualization that can be panned by the user.
````markdown
{% graph height="450px" %}
```json
{
"projects": [
{
"type": "app",
"name": "app-changed",
"data": {
"tags": ["scope:cart"]
}
},
{
"type": "lib",
"name": "lib",
"data": {
"tags": ["scope:cart"]
}
},
{
"type": "lib",
"name": "lib2",
"data": {
"tags": ["scope:cart"]
}
},
{
"type": "lib",
"name": "lib3",
"data": {
"tags": ["scope:cart"]
}
}
],
"groupByFolder": false,
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "libs"
},
"dependencies": {
"app-changed": [
{
"target": "lib",
"source": "app-changed",
"type": "direct"
}
],
"lib": [
{
"target": "lib2",
"source": "lib",
"type": "implicit"
},
{
"target": "lib3",
"source": "lib",
"type": "direct"
}
],
"lib2": [],
"lib3": []
},
"affectedProjectIds": []
}
```
{% /graph %}
````
## Publishing Process
There are multiple versions of the `nx.dev` site.
- [canary.nx.dev](https://canary.nx.dev) contains the documentation on the `master` branch
- [nx.dev](https://nx.dev) contains the documentation as of the latest release of Nx to npm. The main site will not include reference documentation for APIs that have been merged to the codebase, but not yet released to the public.
- `[version].nx.dev` contains the documentation for that version of Nx. `[version]` in this case is the major version up to the current LTS version of Nx. So [18.nx.dev](https://18.nx.dev) will show the Nx documentation as of the last released version of Nx 18.
When a commit that contains documentation is merged into `master`, it will be immediately published to `canary.nx.dev`. Whenever a new release of Nx is published to npm, that documentation will then be available on the main site.
### Immediately Publishing Time-Sensitive Documentation
If you have a documentation change that should be published immediately, you'll need to create 2 PRs.
1. First, create a PR against `master` in the normal manner.
2. Your second PR needs to be made against the website branch with the latest major version of Nx. So your second PR can be created against `website-19` if the latest version of Nx is `19.1.0`. Once `website-19` is updated with your changes, the main `nx.dev` site will be updated.
Later, when Nx `19.1.1` is released, `website-19` will be overwritten with whatever is on `master` and the first PR you created will take effect.
@@ -0,0 +1,27 @@
# package
Build an Angular library
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### project
Type: `string`
The file path for the ng-packagr configuration file, relative to the current workspace.
### tsConfig
Type: `string`
The full path for the TypeScript configuration file, relative to the current workspace.
### watch
Default: `false`
Type: `boolean`
Run build when files change.
@@ -0,0 +1,171 @@
# application
Create an Angular application
## Usage
```bash
nx generate application ...
```
```bash
nx g app ... # same
```
By default, Nx will search for `application` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:application ...
```
Show what will be generated without writing to disk:
```bash
nx g application ... --dry-run
```
## Options
### backendProject
Type: `string`
Backend project that provides data to this application. This sets up proxy.config.json.
### directory
Type: `string`
The directory of the new application.
### e2eTestRunner
Default: `cypress`
Type: `string`
Possible values: `protractor`, `cypress`, `none`
Test runner to use for end to end (e2e) tests
### enableIvy
Default: `true`
Type: `boolean`
Create a new app that uses the Ivy rendering engine.
### inlineStyle
Alias(es): s
Default: `false`
Type: `boolean`
Specifies if the style will be in the ts file.
### inlineTemplate
Alias(es): t
Default: `false`
Type: `boolean`
Specifies if the template will be in the ts file.
### linter
Default: `tslint`
Type: `string`
Possible values: `tslint`
The tool to use for running lint checks.
### name
Type: `string`
The name of the application.
### prefix
Alias(es): p
Type: `string`
The prefix to apply to generated selectors.
### routing
Default: `false`
Type: `boolean`
Generates a routing module.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipPackageJson
Default: `false`
Type: `boolean`
Do not add dependencies to package.json.
### skipTests
Alias(es): S
Default: `false`
Type: `boolean`
Skip creating spec files.
### style
Default: `css`
Type: `string`
Possible values: `css`, `scss`, `styl`, `less`
The file extension to be used for style files.
### tags
Type: `string`
Add tags to the application (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `karma`, `jest`, `none`
Test runner to use for unit tests
### viewEncapsulation
Type: `string`
Possible values: `Emulated`, `Native`, `None`
Specifies the view encapsulation strategy.
@@ -0,0 +1,59 @@
# downgrade-module
Setup Downgrade Module
## Usage
```bash
nx generate downgrade-module ...
```
By default, Nx will search for `downgrade-module` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:downgrade-module ...
```
Show what will be generated without writing to disk:
```bash
nx g downgrade-module ... --dry-run
```
## Options
### angularJsImport
Type: `string`
Import expression of the AngularJS application (e.g., --angularJsImport=some_node_module/my_app).
### name
Type: `string`
The name of the main AngularJS module.
### project
Type: `string`
The name of the project
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipPackageJson
Default: `false`
Type: `boolean`
Do not add @angular/upgrade to package.json (e.g., --skipPackageJson)
@@ -0,0 +1,31 @@
# karma-project
Add karma testing to a project
## Usage
```bash
nx generate karma-project ...
```
By default, Nx will search for `karma-project` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:karma-project ...
```
Show what will be generated without writing to disk:
```bash
nx g karma-project ... --dry-run
```
## Options
### project
Type: `string`
The name of the project.
@@ -0,0 +1,23 @@
# karma
Add karma configuration to a workspace
## Usage
```bash
nx generate karma ...
```
By default, Nx will search for `karma` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:karma ...
```
Show what will be generated without writing to disk:
```bash
nx g karma ... --dry-run
```
@@ -0,0 +1,139 @@
# library
Create an Angular library
## Usage
```bash
nx generate library ...
```
```bash
nx g lib ... # same
```
By default, Nx will search for `library` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:library ...
```
Show what will be generated without writing to disk:
```bash
nx g library ... --dry-run
```
## Options
### directory
Type: `string`
A directory where the lib is placed
### lazy
Default: `false`
Type: `boolean`
Add RouterModule.forChild when set to true, and a simple array of routes when set to false.
### name
Type: `string`
Library name
### parentModule
Type: `string`
Update the router configuration of the parent module using loadChildren or children, depending on what `lazy` is set to.
### prefix
Alias(es): p
Type: `string`
The prefix to apply to generated selectors.
### publishable
Alias(es): buildable
Default: `false`
Type: `boolean`
Generate a buildable library.
### routing
Default: `false`
Type: `boolean`
Add router configuration. See lazy for more information.
### simpleModuleName
Default: `false`
Type: `boolean`
Keep the module name simple (when using --directory)
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipPackageJson
Default: `false`
Type: `boolean`
Do not add dependencies to package.json.
### skipTsConfig
Default: `false`
Type: `boolean`
Do not update tsconfig.json for development experience.
### style
Default: `css`
Type: `string`
Possible values: `css`, `scss`, `styl`, `less`
The file extension to be used for style files.
### tags
Type: `string`
Add tags to the library (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `karma`, `jest`, `none`
Test runner to use for unit tests
@@ -0,0 +1,51 @@
# move
Move an Angular application or library to another folder
## Usage
```bash
nx generate move ...
```
```bash
nx g mv ... # same
```
By default, Nx will search for `move` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:move ...
```
Show what will be generated without writing to disk:
```bash
nx g move ... --dry-run
```
### Examples
Move libs/my-feature-lib to libs/shared/my-feature-lib:
```bash
nx g @nrwl/angular:move --project my-feature-lib shared/my-feature-lib
```
## Options
### destination
Type: `string`
The folder to move the Angular project into
### projectName
Alias(es): project
Type: `string`
The name of the Angular project to move
+135
View File
@@ -0,0 +1,135 @@
# ngrx
Add an ngrx config to a project
## Usage
```bash
nx generate ngrx ...
```
By default, Nx will search for `ngrx` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:ngrx ...
```
Show what will be generated without writing to disk:
```bash
nx g ngrx ... --dry-run
```
## Options
### barrels
Default: `false`
Type: `boolean`
Use barrels to re-export actions, state, and selectors.
### directory
Default: `+state`
Type: `string`
The name of the folder used to contain/group the generated NgRx files.
### facade
Default: `false`
Type: `boolean`
Create a Facade class for the the Feature.
### minimal
Default: `true`
Type: `boolean`
Only register the root state management setup or feature state.
### module
Type: `string`
The path to NgModule where the feature state will be registered. The host directory will create/use the new state directory.
### name
Type: `string`
Name of the NgRx feature state, such as "products" or "users"). Recommended to use the plural form of the name.
### onlyAddFiles
Default: `false`
Type: `boolean`
**Deprecated**, use `skipImport`. Only add new NgRx files, without changing the module file (e.g., --onlyAddFiles).
### onlyEmptyRoot
Default: `false`
Type: `boolean`
**Deprecated**, use `minimal`. Do not generate any files. Only generate StoreModule.forRoot and EffectsModule.forRoot (e.g., --onlyEmptyRoot).
### root
Default: `false`
Type: `boolean`
Setup root or feature state management with NgRx.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting of generated files.
### skipImport
Default: `false`
Type: `boolean`
Generate NgRx feature files without registering the feature in the NgModule.
### skipPackageJson
Default: `false`
Type: `boolean`
Do not update the package.json with NgRx dependencies.
### syntax
Default: `creators`
Type: `string`
Possible values: `classes`, `creators`
Specifies whether to use class-based or creator functions for actions, reducers, and effects.
### useDataPersistence
Default: `false`
Type: `boolean`
Generate NgRx Effects with the DataPersistence helper service. Set to false to use plain effects data persistence operators.
@@ -0,0 +1,37 @@
# stories
Create stories/specs for all components declared in a library
## Usage
```bash
nx generate stories ...
```
By default, Nx will search for `stories` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:stories ...
```
Show what will be generated without writing to disk:
```bash
nx g stories ... --dry-run
```
## Options
### generateCypressSpecs
Type: `boolean`
Automatically generate \*.spec.ts files in the cypress e2e app generated by the cypress-configure schematic
### name
Type: `string`
Library name
@@ -0,0 +1,49 @@
# storybook-configuration
Create stories/specs for all components declared in a library
## Usage
```bash
nx generate storybook-configuration ...
```
By default, Nx will search for `storybook-configuration` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:storybook-configuration ...
```
Show what will be generated without writing to disk:
```bash
nx g storybook-configuration ... --dry-run
```
## Options
### configureCypress
Type: `boolean`
Run the cypress-configure schematic
### generateCypressSpecs
Type: `boolean`
Automatically generate \*.spec.ts files in the cypress e2e app generated by the cypress-configure schematic
### generateStories
Type: `boolean`
Automatically generate \*.stories.ts files for components declared in this library
### name
Type: `string`
Library name
@@ -0,0 +1,73 @@
# upgrade-module
Add an upgrade module
## Usage
```bash
nx generate upgrade-module ...
```
By default, Nx will search for `upgrade-module` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:upgrade-module ...
```
Show what will be generated without writing to disk:
```bash
nx g upgrade-module ... --dry-run
```
## Options
### angularJsCmpSelector
Type: `string`
The selector of an AngularJS component (e.g., --angularJsCmpSelector=myComponent)
### angularJsImport
Type: `string`
Import expression of the AngularJS application (e.g., --angularJsImport=some_node_module/my_app).
### name
Type: `string`
The name of the main AngularJS module.
### project
Type: `string`
The name of the project
### router
Default: `false`
Type: `boolean`
Sets up router synchronization (e.g., --router)
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipPackageJson
Default: `false`
Type: `boolean`
Do not add @angular/upgrade to package.json (e.g., --skipPackageJson)
@@ -0,0 +1,107 @@
# cypress
Run Cypress e2e tests
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### baseUrl
Type: `string`
Use this to pass directly the address of your distant server address with the port running your application
### browser
Type: `string`
The browser to run tests in.
### ciBuildId
Type: `string`
A unique identifier for a run to enable grouping or parallelization.
### copyFiles
Type: `string`
DEPRECATED: A regex string that is used to choose what additional integration files to copy to the dist folder
### cypressConfig
Type: `string`
The path of the Cypress configuration json file.
### devServerTarget
Type: `string`
Dev server target to run tests against.
### exit
Default: `true`
Type: `boolean`
Whether or not the Cypress Test Runner will stay open after running tests in a spec file
### group
Type: `string`
A named group for recorded runs in the Cypress dashboard.
### headless
Default: `false`
Type: `boolean`
Whether or not to open the Cypress application to run the tests. If set to 'true', will run in headless mode
### key
Type: `string`
The key cypress should use to run tests in parallel/record the run (CI only)
### parallel
Default: `false`
Type: `boolean`
Whether or not Cypress should run its tests in parallel (CI only)
### record
Default: `false`
Type: `boolean`
Whether or not Cypress should record the results of the tests
### spec
Type: `string`
A comma delimited glob string that is provided to the Cypress runner to specify which spec files to run. i.e. '**examples/**,**actions.spec**
### tsConfig
Type: `string`
The path of the Cypress tsconfig configuration json file.
### watch
Default: `false`
Type: `boolean`
Recompile and run tests when files change.
@@ -0,0 +1,89 @@
# application
Create an express application
## Usage
```bash
nx generate application ...
```
```bash
nx g app ... # same
```
By default, Nx will search for `application` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/express:application ...
```
Show what will be generated without writing to disk:
```bash
nx g application ... --dry-run
```
## Options
### directory
Type: `string`
The directory of the new application.
### frontendProject
Type: `string`
Frontend project that needs to access this application. This sets up proxy configuration.
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
The name of the application.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipPackageJson
Default: `false`
Type: `boolean`
Do not add dependencies to package.json.
### tags
Type: `string`
Add tags to the application (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
+207
View File
@@ -0,0 +1,207 @@
# jest
Run Jest unit tests
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### bail
Alias(es): b
Type: `number`
Exit the test suite immediately after `n` number of failing tests. (https://jestjs.io/docs/en/cli#bail)
### ci
Type: `boolean`
Whether to run Jest in continuous integration (CI) mode. This option is on by default in most popular CI environments. It will prevent snapshots from being written unless explicitly requested. (https://jestjs.io/docs/en/cli#ci)
### clearCache
Type: `boolean`
Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory. _Note: clearing the cache will reduce performance_.
### codeCoverage
Type: `boolean`
Indicates that test coverage information should be collected and reported in the output. (https://jestjs.io/docs/en/cli#coverage)
### color
Alias(es): colors
Type: `boolean`
Forces test results output color highlighting (even if stdout is not a TTY). Set to false if you would like to have no colors. (https://jestjs.io/docs/en/cli#colors)
### colors
Type: `boolean`
Forces test results output highlighting even if stdout is not a TTY. (https://jestjs.io/docs/en/cli#colors)
### config
Type: `string`
The path to a Jest config file specifying how to find and execute tests. If no rootDir is set in the config, the directory containing the config file is assumed to be the rootDir for the project. This can also be a JSON-encoded value which Jest will use as configuration
### coverageDirectory
Type: `string`
An array of regexp pattern strings that are matched against all file paths before executing the test. If the file path matches any of the patterns, coverage information will be skipped.
### coverageReporters
Type: `string`
A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter
### findRelatedTests
Type: `string`
Find and run the tests that cover a comma separated list of source files that were passed in as arguments. (https://jestjs.io/docs/en/cli#findrelatedtests-spaceseparatedlistofsourcefiles)
### jestConfig
Type: `string`
The path of the Jest configuration. (https://jestjs.io/docs/en/configuration)
### json
Type: `boolean`
Prints the test results in JSON. This mode will send all other test output and user messages to stderr. (https://jestjs.io/docs/en/cli#json)
### maxWorkers
Alias(es): w
Type: `number`
Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default) (https://jestjs.io/docs/en/cli#maxworkers-num)
### onlyChanged
Alias(es): o
Type: `boolean`
Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a git or hg repository at the moment. (https://jestjs.io/docs/en/cli#onlychanged)
### outputFile
Type: `string`
Write test results to a file when the --json option is also specified. (https://jestjs.io/docs/en/cli#outputfile-filename)
### passWithNoTests
Type: `boolean`
Will not fail if no tests are found (for example while using `--testPathPattern`.) (https://jestjs.io/docs/en/cli#passwithnotests)
### reporters
Type: `array`
Run tests with specified reporters. Reporter options are not available via CLI. Example with multiple reporters: jest --reporters="default" --reporters="jest-junit" (https://jestjs.io/docs/en/cli#reporters)
### runInBand
Alias(es): i
Type: `boolean`
Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI. (https://jestjs.io/docs/en/cli#runinband)
### setupFile
Type: `string`
The name of a setup file used by Jest. (https://jestjs.io/docs/en/configuration#setupfilesafterenv-array)
### silent
Type: `boolean`
Prevent tests from printing messages through the console. (https://jestjs.io/docs/en/cli#silent)
### testFile
Type: `string`
The name of the file to test.
### testLocationInResults
Type: `boolean`
Adds a location field to test results. Used to report location of a test in a reporter. { "column": 4, "line": 5 } (https://jestjs.io/docs/en/cli#testlocationinresults)
### testNamePattern
Alias(es): t
Type: `string`
Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/en/cli#testnamepattern-regex)
### testPathPattern
Type: `array`
An array of regexp pattern strings that is matched against all tests paths before executing the test. (https://jestjs.io/docs/en/cli#testpathpattern-regex)
### testResultsProcessor
Type: `string`
Node module that implements a custom results processor. (https://jestjs.io/docs/en/configuration#testresultsprocessor-string)
### tsConfig
Type: `string`
The name of the Typescript configuration file.
### updateSnapshot
Alias(es): u
Type: `boolean`
Use this flag to re-record snapshots. Can be used together with a test suite pattern or with `--testNamePattern` to re-record snapshot for test matching the pattern. (https://jestjs.io/docs/en/cli#updatesnapshot)
### useStderr
Type: `boolean`
Divert all output to stderr.
### verbose
Type: `boolean`
Display individual test results with the test suite hierarchy. (https://jestjs.io/docs/en/cli#verbose)
### watch
Type: `boolean`
Watch files for changes and rerun tests related to changed files. If you want to re-run all tests when a file has changed, use the `--watchAll` option. (https://jestjs.io/docs/en/cli#watch)
### watchAll
Type: `boolean`
Watch files for changes and rerun all tests when something changes. If you want to re-run only the tests that depend on the changed files, use the `--watch` option. (https://jestjs.io/docs/en/cli#watchall)
+93
View File
@@ -0,0 +1,93 @@
# lint
Lint a project
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### cache
Default: `false`
Type: `boolean`
Only check changed files.
### cacheLocation
Type: `string`
Path to the cache file or directory.
### config
Type: `string`
The name of the configuration file.
### exclude
Type: `array`
Files to exclude from linting.
### files
Type: `array`
Files to include in linting.
### fix
Default: `false`
Type: `boolean`
Fixes linting errors (may overwrite linted files).
### force
Default: `false`
Type: `boolean`
Succeeds even if there was linting errors.
### format
Default: `stylish`
Type: `string`
ESLint Output formatter (https://eslint.org/docs/user-guide/formatters).
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### outputFile
Type: `string`
File to write report to.
### silent
Default: `false`
Type: `boolean`
Hide output text.
### tsConfig
Type: `string | array`
The name of the TypeScript configuration file.
@@ -0,0 +1,89 @@
# application
Create a nest application
## Usage
```bash
nx generate application ...
```
```bash
nx g app ... # same
```
By default, Nx will search for `application` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/nest:application ...
```
Show what will be generated without writing to disk:
```bash
nx g application ... --dry-run
```
## Options
### directory
Type: `string`
The directory of the new application.
### frontendProject
Type: `string`
Frontend project that needs to access this application. This sets up proxy configuration.
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
The name of the application.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipPackageJson
Default: `false`
Type: `boolean`
Do not add dependencies to package.json.
### tags
Type: `string`
Add tags to the application (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
+147
View File
@@ -0,0 +1,147 @@
# library
Create a new nest library
## Usage
```bash
nx generate library ...
```
```bash
nx g lib ... # same
```
By default, Nx will search for `library` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/nest:library ...
```
Show what will be generated without writing to disk:
```bash
nx g library ... --dry-run
```
### Examples
Generate libs/myapp/mylib:
```bash
nx g lib mylib --directory=myapp
```
## Options
### controller
Default: `false`
Type: `boolean`
Include a controller with the library
### directory
Alias(es): d
Type: `string`
A directory where the app is placed
### global
Default: `false`
Type: `boolean`
Add the Global decorator to the generated module.
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
Library name
### publishable
Alias(es): buildable
Type: `boolean`
Create a buildable library.
### service
Default: `false`
Type: `boolean`
Include a service with the library.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipTsConfig
Default: `false`
Type: `boolean`
Do not update tsconfig.json for development experience.
### tags
Alias(es): t
Type: `string`
Add tags to the library (used for linting)
### target
Default: `es6`
Type: `string`
Possible values: `es5`, `es6`, `esnext`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020`
The es target, Nest suggest using es6 or higher.
### testEnvironment
Default: `node`
Type: `string`
Possible values: `jsdom`, `node`
The test environment for jest, for node applications this should stay as node unless doing DOM testing.
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
+37
View File
@@ -0,0 +1,37 @@
# build
Build a Next.js app
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### fileReplacements
Type: `array` of `object`
Replace files with other files in the build.
#### replace
Type: `string`
undefined
#### with
Type: `string`
undefined
### outputPath
Type: `string`
The output path of the generated files.
### root
Type: `string`
The source root
@@ -0,0 +1,63 @@
# dev-server
Serve a Next.js app
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### buildTarget
Type: `string`
Target which builds the application
### customServerPath
Type: `string`
Use a custom server script
### dev
Default: `true`
Type: `boolean`
Serve the application in the dev mode
### hostname
Type: `string`
Hostname on which the application is served.
### port
Default: `4200`
Type: `number`
Port to listen on.
### proxyConfig
Type: `string`
Path to the proxy configuration file.
### quiet
Default: `false`
Type: `boolean`
Hide error messages containing server information.
### staticMarkup
Default: `false`
Type: `boolean`
Static markup.
+27
View File
@@ -0,0 +1,27 @@
# export
Export a Next.js app. The exported application is located at dist/\$outputPath/exported.
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### buildTarget
Type: `string`
Target which builds the application
### silent
Default: `false`
Type: `boolean`
Hide progress or not (default is false)
### threads
Type: `number`
Number of worker threads to utilize (defaults to the number of CPUs)
@@ -0,0 +1,149 @@
# application
Create a Next.js application
## Usage
```bash
nx generate application ...
```
```bash
nx g app ... # same
```
By default, Nx will search for `application` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/next:application ...
```
Show what will be generated without writing to disk:
```bash
nx g application ... --dry-run
```
### Examples
Generate apps/myorg/myapp and apps/myorg/myapp-e2e:
```bash
nx g app myapp --directory=myorg
```
Use class components instead of functional components:
```bash
nx g app myapp --classComponent
```
## Options
### classComponent
Alias(es): C
Default: `false`
Type: `boolean`
Use class components instead of functional component
### directory
Alias(es): d
Type: `string`
The directory of the new application.
### e2eTestRunner
Default: `cypress`
Type: `string`
Possible values: `cypress`, `none`
Test runner to use for end to end (e2e) tests
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
The name of the application.
### pascalCaseFiles
Alias(es): P
Default: `false`
Type: `boolean`
Use pascal case component file name (e.g. App.tsx)
### server
Type: `string`
The server script path to be used with next.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipWorkspaceJson
Default: `false`
Type: `boolean`
Skip updating workspace.json with default schematic options based on values provided to this app (e.g. babel, style)
### style
Alias(es): s
Default: `css`
Type: `string`
Possible values: `css`, `scss`, `styl`, `less`, `styled-components`, `@emotion/styled`
The file extension to be used for style files.
### tags
Alias(es): t
Type: `string`
Add tags to the application (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
+153
View File
@@ -0,0 +1,153 @@
# build
Build a Node application
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### assets
Type: `array`
List of static application assets.
### buildLibsFromSource
Default: `false`
Type: `boolean`
Read buildable libraries from source instead of building them separately.
### externalDependencies
Default: `all`
Type: `string | array`
Dependencies to keep external to the bundle. ("all" (default), "none", or an array of module names)
### extractLicenses
Default: `false`
Type: `boolean`
Extract all licenses in a separate file, in the case of production builds only.
### fileReplacements
Type: `array` of `object`
Replace files with other files in the build.
#### replace
Type: `string`
undefined
#### with
Type: `string`
undefined
### main
Type: `string`
The name of the main entry-point file.
### maxWorkers
Type: `number`
Number of workers to use for type checking. (defaults to # of CPUS - 2)
### memoryLimit
Type: `number`
Memory limit for type checking service process in MB. (defaults to 2048)
### optimization
Default: `false`
Type: `boolean`
Defines the optimization level of the build.
### outputPath
Type: `string`
The output path of the generated files.
### poll
Type: `number`
Frequency of file watcher in ms.
### progress
Default: `false`
Type: `boolean`
Log progress to the console while building.
### showCircularDependencies
Default: `true`
Type: `boolean`
Show circular dependency warnings on builds.
### sourceMap
Default: `true`
Type: `boolean`
Produce source maps.
### statsJson
Default: `false`
Type: `boolean`
Generates a 'stats.json' file which can be analyzed using tools such as: #webpack-bundle-analyzer' or https: //webpack.github.io/analyse.
### tsConfig
Type: `string`
The name of the Typescript configuration file.
### verbose
Default: `false`
Type: `boolean`
Emits verbose output
### watch
Default: `false`
Type: `boolean`
Run build when files change.
### webpackConfig
Type: `string`
Path to a function which takes a webpack config, context and returns the resulting webpack config
+63
View File
@@ -0,0 +1,63 @@
# execute
Execute a Node application
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### args
Type: `array`
Extra args when starting the app
### buildTarget
Type: `string`
The target to run to build you 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: `0`
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
### watch
Default: `true`
Type: `boolean`
Run build when files change
+53
View File
@@ -0,0 +1,53 @@
# package
Package a Node library
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### assets
Type: `array`
List of static library assets.
### main
Type: `string`
The name of the main entry-point file.
### outputPath
Type: `string`
The output path of the generated files.
### packageJson
Type: `string`
The name of the package.json file
### sourceMap
Default: `true`
Type: `boolean`
Output sourcemaps.
### tsConfig
Type: `string`
The name of the Typescript configuration file.
### watch
Default: `false`
Type: `boolean`
Enable re-building when files change.
@@ -0,0 +1,89 @@
# application
Create a node application
## Usage
```bash
nx generate application ...
```
```bash
nx g app ... # same
```
By default, Nx will search for `application` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/node:application ...
```
Show what will be generated without writing to disk:
```bash
nx g application ... --dry-run
```
## Options
### directory
Type: `string`
The directory of the new application.
### frontendProject
Type: `string`
Frontend project that needs to access this application. This sets up proxy configuration.
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
The name of the application.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipPackageJson
Default: `false`
Type: `boolean`
Do not add dependencies to package.json.
### tags
Type: `string`
Add tags to the application (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
+113
View File
@@ -0,0 +1,113 @@
# library
Create a library
## Usage
```bash
nx generate library ...
```
```bash
nx g lib ... # same
```
By default, Nx will search for `library` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/node:library ...
```
Show what will be generated without writing to disk:
```bash
nx g library ... --dry-run
```
### Examples
Generate libs/myapp/mylib:
```bash
nx g lib mylib --directory=myapp
```
## Options
### directory
Alias(es): d
Type: `string`
A directory where the lib is placed
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
Library name
### publishable
Alias(es): buildable
Type: `boolean`
Create a publishable library.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipTsConfig
Default: `false`
Type: `boolean`
Do not update tsconfig.json for development experience.
### tags
Alias(es): t
Type: `string`
Add tags to the library (used for linting)
### testEnvironment
Default: `jsdom`
Type: `string`
Possible values: `jsdom`, `node`
The test environment to use if unitTestRunner is set to jest
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
@@ -0,0 +1,25 @@
# e2e
Creates and runs an e2e for a Nx Plugin
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### jestConfig
Type: `string`
Jest config file
### target
Type: `string`
the target Nx Plugin project and build
### tsSpecConfig
Type: `string`
Spec tsconfig file
@@ -0,0 +1,91 @@
# plugin
Create a Nx Plugin
## Usage
```bash
nx generate plugin ...
```
By default, Nx will search for `plugin` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/nx-plugin:plugin ...
```
Show what will be generated without writing to disk:
```bash
nx g plugin ... --dry-run
```
### Examples
Generate libs/plugins/my-plugin:
```bash
nx g plugin my-plugin --directory=plugins
```
## Options
### directory
Alias(es): d
Type: `string`
A directory where the plugin is placed
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
Plugin name
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipTsConfig
Default: `false`
Type: `boolean`
Do not update tsconfig.json for development experience.
### tags
Alias(es): t
Type: `string`
Add tags to the library (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
@@ -0,0 +1,175 @@
# application
Create an application
## Usage
```bash
nx generate application ...
```
```bash
nx g app ... # same
```
By default, Nx will search for `application` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/react:application ...
```
Show what will be generated without writing to disk:
```bash
nx g application ... --dry-run
```
### Examples
Generate apps/myorg/myapp and apps/myorg/myapp-e2e:
```bash
nx g app myapp --directory=myorg
```
Use class components instead of functional components:
```bash
nx g app myapp --classComponent
```
Set up React Router:
```bash
nx g app myapp --routing
```
## Options
### babelJest
Alias(es): babel-jest
Default: `false`
Type: `boolean`
Use babel-jest instead of ts-jest
### classComponent
Alias(es): C
Default: `false`
Type: `boolean`
Use class components instead of functional component
### directory
Alias(es): d
Type: `string`
The directory of the new application.
### e2eTestRunner
Default: `cypress`
Type: `string`
Possible values: `cypress`, `none`
Test runner to use for end to end (e2e) tests
### js
Default: `false`
Type: `boolean`
Generate JavaScript files rather than TypeScript files
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
The name of the application.
### pascalCaseFiles
Alias(es): P
Default: `false`
Type: `boolean`
Use pascal case component file name (e.g. App.tsx)
### routing
Default: `false`
Type: `boolean`
Generate application with routes
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipWorkspaceJson
Default: `false`
Type: `boolean`
Skip updating workspace.json with default schematic options based on values provided to this app (e.g. babel, style)
### style
Alias(es): s
Default: `css`
Type: `string`
Possible values: `css`, `scss`, `styl`, `less`, `styled-components`, `@emotion/styled`, `none`
The file extension to be used for style files.
### tags
Alias(es): t
Type: `string`
Add tags to the application (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
@@ -0,0 +1,137 @@
# component
Create a component
## Usage
```bash
nx generate component ...
```
```bash
nx g c ... # same
```
By default, Nx will search for `component` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/react:component ...
```
Show what will be generated without writing to disk:
```bash
nx g component ... --dry-run
```
### Examples
Generate a component in the mylib library:
```bash
nx g component my-component --project=mylib
```
Generate a class component in the mylib library:
```bash
nx g component my-component --project=mylib --classComponent
```
## Options
### classComponent
Alias(es): C
Default: `false`
Type: `boolean`
Use class components instead of functional component.
### directory
Alias(es): d
Type: `string`
Create the component under this directory (can be nested).
### export
Alias(es): e
Default: `false`
Type: `boolean`
When true, the component is exported from the project index.ts (if it exists).
### flat
Default: `false`
Type: `boolean`
Create component at the source root rather than its own directory.
### js
Default: `false`
Type: `boolean`
Generate JavaScript files rather than TypeScript files.
### name
Type: `string`
The name of the component.
### pascalCaseFiles
Alias(es): P
Default: `false`
Type: `boolean`
Use pascal case component file name (e.g. App.tsx).
### project
Alias(es): p
Type: `string`
The name of the project.
### routing
Type: `boolean`
Generate a library with routes.
### skipTests
Default: `false`
Type: `boolean`
When true, does not create "spec.ts" test files for the new component.
### style
Alias(es): s
Default: `css`
Type: `string`
Possible values: `css`, `scss`, `styl`, `less`, `styled-components`, `@emotion/styled`, `none`
The file extension to be used for style files.
@@ -0,0 +1,171 @@
# library
Create a library
## Usage
```bash
nx generate library ...
```
```bash
nx g lib ... # same
```
By default, Nx will search for `library` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/react:library ...
```
Show what will be generated without writing to disk:
```bash
nx g library ... --dry-run
```
### Examples
Generate libs/myapp/mylib:
```bash
nx g lib mylib --directory=myapp
```
Generate a library with routes and add them to myapp:
```bash
nx g lib mylib --appProject=myapp
```
## Options
### appProject
Alias(es): a
Type: `string`
The application project to add the library route to
### babelJest
Alias(es): babel-jest
Default: `false`
Type: `boolean`
Use babel-jest instead of ts-jest
### component
Default: `true`
Type: `boolean`
Generate a default component
### directory
Alias(es): d
Type: `string`
A directory where the lib is placed
### js
Default: `false`
Type: `boolean`
Generate JavaScript files rather than TypeScript files
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
Library name
### pascalCaseFiles
Alias(es): P
Default: `false`
Type: `boolean`
Use pascal case component file name (e.g. App.tsx)
### publishable
Alias(es): buildable
Type: `boolean`
Create a buildable library.
### routing
Type: `boolean`
Generate library with routes
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipTsConfig
Default: `false`
Type: `boolean`
Do not update tsconfig.json for development experience.
### style
Alias(es): s
Default: `css`
Type: `string`
Possible values: `css`, `scss`, `styl`, `less`, `styled-components`, `@emotion/styled`, `none`
The file extension to be used for style files.
### tags
Alias(es): t
Type: `string`
Add tags to the library (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
@@ -0,0 +1,67 @@
# redux
Create a redux slice for a project
## Usage
```bash
nx generate redux ...
```
```bash
nx g slice ... # same
```
By default, Nx will search for `redux` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/react:redux ...
```
Show what will be generated without writing to disk:
```bash
nx g redux ... --dry-run
```
## Options
### appProject
Alias(es): a
Type: `string`
The application project to add the slice to.
### directory
Alias(es): d
Type: `string`
The name of the folder used to contain/group the generated Redux files.
### js
Default: `false`
Type: `boolean`
Generate JavaScript files rather than TypeScript files
### name
Type: `string`
Redux slice name
### project
Alias(es): p
Type: `string`
The name of the project to add the slice to. If it is an application, then the store configuration will be updated too.
@@ -0,0 +1,45 @@
# storybook-configuration
Set up storybook for a react library
## Usage
```bash
nx generate storybook-configuration ...
```
By default, Nx will search for `storybook-configuration` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/react:storybook-configuration ...
```
Show what will be generated without writing to disk:
```bash
nx g storybook-configuration ... --dry-run
```
## Options
### configureCypress
Type: `boolean`
Run the cypress-configure schematic
### js
Default: `false`
Type: `boolean`
Generate JavaScript files rather than TypeScript files
### name
Type: `string`
Library name
@@ -0,0 +1,37 @@
# build
Build Storybook
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### docsMode
Default: `false`
Type: `boolean`
Build a documentation-only site using addon-docs.
### outputPath
Type: `string`
The output path of the generated files.
### quiet
Default: `true`
Type: `boolean`
Suppress verbose build output.
### uiFramework (**hidden**)
Default: `@storybook/angular`
Type: `string`
Storybook framework npm package
@@ -0,0 +1,73 @@
# storybook
Serve Storybook
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### host
Default: `localhost`
Type: `string`
Host to listen on.
### port
Default: `9009`
Type: `number`
Port to listen on.
### quiet
Default: `true`
Type: `boolean`
Suppress verbose build output.
### ssl
Default: `false`
Type: `boolean`
Serve using HTTPS.
### sslCert
Type: `string`
SSL certificate to use for serving HTTPS.
### sslKey
Type: `string`
SSL key to use for serving HTTPS.
### staticDir
Type: `array`
Directory where to load static files from, array of strings
### uiFramework (**hidden**)
Default: `@storybook/angular`
Type: `string`
Storybook framework npm package
### watch
Default: `true`
Type: `boolean`
Watches for changes and rebuilds application
@@ -0,0 +1,53 @@
# configuration
Add storybook configuration to a ui library
## Usage
```bash
nx generate configuration ...
```
By default, Nx will search for `configuration` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/storybook:configuration ...
```
Show what will be generated without writing to disk:
```bash
nx g configuration ... --dry-run
```
## Options
### configureCypress
Type: `boolean`
Run the cypress-configure schematic
### js
Default: `false`
Type: `boolean`
Generate JavaScript files rather than TypeScript files
### name
Type: `string`
Library name
### uiFramework
Type: `string`
Possible values: `@storybook/angular`, `@storybook/react`, `@storybook/web`
Storybook UI Framework to use
@@ -0,0 +1,39 @@
# cypress-project
Add cypress e2e app to test a ui library that is set up for storybook
## Usage
```bash
nx generate cypress-project ...
```
By default, Nx will search for `cypress-project` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/storybook:cypress-project ...
```
Show what will be generated without writing to disk:
```bash
nx g cypress-project ... --dry-run
```
## Options
### js
Default: `false`
Type: `boolean`
Generate JavaScript files rather than TypeScript files
### name
Type: `string`
Library name
+237
View File
@@ -0,0 +1,237 @@
# build
Build a application
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### assets
Type: `array`
List of static application assets.
### baseHref
Default: `/`
Type: `string`
Base url for the application being built.
### budgets
Type: `array`
Budget thresholds to ensure parts of your application stay within boundaries which you set.
### buildLibsFromSource
Default: `false`
Type: `boolean`
Read buildable libraries from source instead of building them separately.
### commonChunk
Default: `true`
Type: `boolean`
Use a separate bundle containing code used across multiple bundles.
### deployUrl
Type: `string`
URL where the application will be deployed.
### es2015Polyfills
Type: `string`
Conditional polyfills loaded in browsers which do not support ES2015.
### extractCss
Default: `false`
Type: `boolean`
Extract css into a .css file
### extractLicenses
Default: `false`
Type: `boolean`
Extract all licenses in a separate file, in the case of production builds only.
### fileReplacements
Type: `array` of `object`
Replace files with other files in the build.
#### replace
Type: `string`
undefined
#### with
Type: `string`
undefined
### index
Type: `string`
HTML File which will be contain the application
### main
Type: `string`
The name of the main entry-point file.
### maxWorkers
Type: `number`
Number of workers to use for type checking. (defaults to # of CPUS - 2)
### memoryLimit
Type: `number`
Memory limit for type checking service process in MB. (defaults to 2048)
### namedChunks
Default: `true`
Type: `boolean`
Names the produced bundles according to their entry file
### optimization
Type: `boolean`
Enables optimization of the build output.
### outputHashing
Default: `none`
Type: `string`
Possible values: `none`, `all`, `media`, `bundles`
Define the output filename cache-busting hashing mode.
### outputPath
Type: `string`
The output path of the generated files.
### polyfills
Type: `string`
Polyfills to load before application
### progress
Default: `false`
Type: `boolean`
Log progress to the console while building.
### scripts
Type: `array`
External Scripts which will be included before the main application entry
### showCircularDependencies
Default: `true`
Type: `boolean`
Show circular dependency warnings on builds.
### sourceMap
Default: `true`
Type: `boolean`
Output sourcemaps.
### statsJson
Default: `false`
Type: `boolean`
Generates a 'stats.json' file which can be analyzed using tools such as: #webpack-bundle-analyzer' or https://webpack.github.io/analyse.
### styles
Type: `array`
External Styles which will be included with the application
### subresourceIntegrity
Default: `false`
Type: `boolean`
Enables the use of subresource integrity validation.
### tsConfig
Type: `string`
The name of the Typescript configuration file.
### vendorChunk
Default: `true`
Type: `boolean`
Use a separate bundle containing only vendor libraries.
### verbose
Default: `false`
Type: `boolean`
Emits verbose output
### watch
Default: `false`
Type: `boolean`
Enable re-building when files change.
### webpackConfig
Type: `string`
Path to a function which takes a webpack config, some context and returns the resulting webpack config
@@ -0,0 +1,97 @@
# dev-server
Serve a web application
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### allowedHosts
Type: `string`
This option allows you to whitelist services that are allowed to access the dev server.
### buildTarget
Type: `string`
Target which builds the application
### host
Default: `localhost`
Type: `string`
Host to listen on.
### liveReload
Default: `true`
Type: `boolean`
Whether to reload the page on change, using live-reload.
### maxWorkers
Type: `number`
Number of workers to use for type checking.
### memoryLimit
Type: `number`
Memory limit for type checking service process in MB.
### open
Default: `false`
Type: `boolean`
Open the application in the browser.
### port
Default: `4200`
Type: `number`
Port to listen on.
### publicHost
Type: `string`
Public URL where the application will be served
### ssl
Default: `false`
Type: `boolean`
Serve using HTTPS.
### sslCert
Type: `string`
SSL certificate to use for serving HTTPS.
### sslKey
Type: `string`
SSL key to use for serving HTTPS.
### watch
Default: `true`
Type: `boolean`
Watches for changes and rebuilds application
+89
View File
@@ -0,0 +1,89 @@
# package
Package a library
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Properties
### babelConfig
Type: `string`
Path to a function which takes a babel config and returns an updated babel config
### entryFile
Type: `string`
The path to the entry file, relative to project.
### external
Type: `array`
A list of external modules that will not be bundled (react, react-dom, etc.).
### extractCss
Default: `true`
Type: `boolean`
CSS files will be extracted to the output folder.
### globals
Type: `array` of `object`
A mapping of node modules to their UMD global names. Used by the UMD bundle
#### moduleId
Type: `string`
The node module to map from (e.g. `react-dom`).
#### global
Type: `string`
The global name to map to (e.g. `ReactDOM`).
### outputPath
Type: `string`
The output path of the generated files.
### project
Type: `string`
The path to package.json file.
### rollupConfig
Type: `string`
Path to a function which takes a rollup config and returns an updated rollup config
### tsConfig
Type: `string`
The path to tsconfig file.
### umdName
Type: `string`
The name of your module in UMD format. Defaulted to your project name.
### watch
Default: `false`
Type: `boolean`
Enable re-building when files change.
@@ -0,0 +1,95 @@
# application
Create an application
## Usage
```bash
nx generate application ...
```
```bash
nx g app ... # same
```
By default, Nx will search for `application` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/web:application ...
```
Show what will be generated without writing to disk:
```bash
nx g application ... --dry-run
```
## Options
### directory
Type: `string`
The directory of the new application.
### e2eTestRunner
Default: `cypress`
Type: `string`
Possible values: `cypress`, `none`
Test runner to use for end to end (e2e) tests
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
The name of the application.
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### style
Default: `css`
Type: `string`
Possible values: `css`, `scss`, `styl`, `less`
The file extension to be used for style files.
### tags
Type: `string`
Add tags to the application (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
@@ -0,0 +1,197 @@
# run-commands
Run any custom commands with Nx
Builder properties can be configured in angular.json when defining the builder, or when invoking it.
## Examples
`workspace.json`:
```json
//...
"frontend": {
"architect": {
//...
"ls-project-root": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "ls apps/frontend/src"
}
]
}
}
}
}
```
```bash
nx run frontend:ls-project-root
```
##### Chaining commands, interpolating args and setting the cwd
Let's say each of our workspace projects has some custom bash scripts in a `scripts` folder.
We want a simple way to create empty bash script files for a given project, that have the execute permissions already set.
Given that Nx knows our workspace structure, we should be able to give it a project and the name of our script, and it should take care of the rest.
The `commands` option accepts as many commands as you want. By default, they all run in parallel.
You can run them sequentially by setting `parallel: false`:
```json
"create-script": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "mkdir -p scripts"
},
{
"command": "touch scripts/{args.name}.sh"
},
{
"command": "chmod +x scripts/{args.name}.sh"
}
],
"cwd": "apps/frontend",
"parallel": false
}
}
```
By setting the `cwd` option, each command will run in the `apps/frontend` folder.
We run the above with:
```bash
nx run frontend:create-script --args="--name=example"
```
Notice the `--args="--name=example"` syntax: we can send custom arguments that will be interpolated into our commands via `{args.name}`
##### Custom **done** conditions
Normally, `run-commands` considers the commands done when all of them have finished running. If you don't need to wait until they're all done, you can set a special string, that considers the command finished the moment the string appears in `stdout` or `stderr`:
```json
"finish-when-ready": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{ "command": "echo 'READY' && sleep 5 && echo 'FINISHED'" }
],
"readyWhen": "READY"
}
}
```
```bash
nx run frontend:finish-when-ready
```
The above command will finish immediately, instead of waiting for 5 seconds.
##### Nx Affected
The true power of `run-commands` comes from the fact that it runs through `nx`, which knows about your dependency graph. So you can run **custom commands** only for the projects that have been affected by a change.
We can create some configurations to generate docs, and if run using `nx affected`, it will only generate documentation for the projects that have been changed:
```bash
nx affected --target=generate-docs
```
```json
//...
"frontend": {
"architect": {
//...
"generate-docs": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "npx compodoc -p apps/frontend/tsconfig.app.json"
}
]
}
}
}
},
"api": {
"architect": {
//...
"generate-docs": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "npx compodoc -p apps/api/tsconfig.app.json"
}
]
}
}
}
}
```
## Properties
### args
Type: `string`
Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)
### color
Default: `false`
Type: `boolean`
Use colors when showing output of command
### commands
Type: `array` of `object`
#### command
Type: `string`
Command to run in child process
### cwd
Type: `string`
Current working directory of the commands.
### envFile
Type: `string`
You may specify a custom .env file path
### outputPath
Type: `string | array`
Tells Nx where the files will be created
### parallel
Default: `true`
Type: `boolean`
Run commands in parallel
### readyWhen
Type: `string`
String to appear in stdout or stderr that indicates that the task is done. This option can only be used when parallel is set to true. If not specified, the task is done when all the child processes complete.
@@ -0,0 +1,101 @@
# library
Create a library
## Usage
```bash
nx generate library ...
```
```bash
nx g lib ... # same
```
By default, Nx will search for `library` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/workspace:library ...
```
Show what will be generated without writing to disk:
```bash
nx g library ... --dry-run
```
### Examples
Generate libs/myapp/mylib:
```bash
nx g lib mylib --directory=myapp
```
## Options
### directory
Type: `string`
A directory where the lib is placed
### linter
Default: `tslint`
Type: `string`
Possible values: `eslint`, `tslint`
The tool to use for running lint checks.
### name
Type: `string`
Library name
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipTsConfig
Default: `false`
Type: `boolean`
Do not update tsconfig.json for development experience.
### tags
Type: `string`
Add tags to the library (used for linting)
### testEnvironment
Default: `jsdom`
Type: `string`
Possible values: `jsdom`, `node`
The test environment to use if unitTestRunner is set to jest
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `jest`, `none`
Test runner to use for unit tests
@@ -0,0 +1,51 @@
# move
Move an application or library to another folder
## Usage
```bash
nx generate move ...
```
```bash
nx g mv ... # same
```
By default, Nx will search for `move` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/workspace:move ...
```
Show what will be generated without writing to disk:
```bash
nx g move ... --dry-run
```
### Examples
Move libs/my-feature-lib to libs/shared/my-feature-lib:
```bash
nx g @nrwl/workspace:move --project my-feature-lib shared/my-feature-lib
```
## Options
### destination
Type: `string`
The folder to move the project into
### projectName
Alias(es): project
Type: `string`
The name of the project to move
@@ -0,0 +1,71 @@
# remove
Remove an application or library
## Usage
```bash
nx generate remove ...
```
```bash
nx g rm ... # same
```
By default, Nx will search for `remove` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/workspace:remove ...
```
Show what will be generated without writing to disk:
```bash
nx g remove ... --dry-run
```
### Examples
Remove my-feature-lib from the workspace:
```bash
nx g @nrwl/workspace:remove my-feature-lib
```
Force removal of my-feature-lib from the workspace:
```bash
nx g @nrwl/workspace:remove my-feature-lib --forceRemove
```
## Options
### forceRemove
Alias(es): force-remove
Default: `false`
Type: `boolean`
When true, forces removal even if the project is still in use.
### projectName
Alias(es): project
Type: `string`
The name of the project to remove
### skipFormat
Alias(es): skip-format
Default: `false`
Type: `boolean`
Skip formatting files.
@@ -0,0 +1,39 @@
# workspace-schematic
Generates a workspace schematic
## Usage
```bash
nx generate workspace-schematic ...
```
By default, Nx will search for `workspace-schematic` in the default collection provisioned in `angular.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/workspace:workspace-schematic ...
```
Show what will be generated without writing to disk:
```bash
nx g workspace-schematic ... --dry-run
```
## Options
### name
Type: `string`
Schematic name
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
+50
View File
@@ -0,0 +1,50 @@
# API
Here is the list of all the available packages inside the Nx ecosystem. You
can see, for each package its dependencies.
| PackageName | Dependencies | PeerDependencies |
| --------------- | ------------------------------------------------- | ---------------- |
| @nrwl/angular | @nrwl/cypress, @nrwl/jest | @nrwl/workspace |
| @nrwl/cypress | | @nrwl/workspace |
| @nrwl/express | @nrwl/node, @nrwl/jest | @nrwl/workspace |
| @nrwl/jest | | @nrwl/workspace |
| @nrwl/linter | | @nrwl/workspace |
| @nrwl/nest | @nrwl/node, @nrwl/jest | @nrwl/workspace |
| @nrwl/node | @nrwl/jest, @nrwl/linter | @nrwl/workspace |
| @nrwl/react | @nrwl/cypress, @nrwl/jest, @nrwl/web | @nrwl/workspace |
| @nrwl/next | @nrwl/cypress, @nrwl/jest, @nrwl/web, @nrwl/react | @nrwl/workspace |
| @nrwl/web | @nrwl/cypress, @nrwl/jest, @nrwl/linter | @nrwl/workspace |
| @nrwl/workspace | @nrwl/cli | |
## Angular
![Angular](/assets/content/shared/api/angular.jpg)
## React
![React](/assets/content/shared/api/react.jpg)
## Nest
![Nest](/assets/content/shared/api/nest.jpg)
## Express
![Express](/assets/content/shared/api/express.jpg)
## Node
![Node](/assets/content/shared/api/node.jpg)
## Cypress
![Cypress](/assets/content/shared/api/cypress.jpg)
## Jest
![Jest](/assets/content/shared/api/jest.jpg)
## Web
![Web](/assets/content/shared/api/web.jpg)
+14
View File
@@ -0,0 +1,14 @@
[
"angular",
"cypress",
"express",
"jest",
"linter",
"nest",
"next",
"node",
"nx-plugin",
"storybook",
"web",
"workspace"
]

Some files were not shown because too many files have changed in this diff Show More