chore(prettier): add end of line settings (#1070)
Remove `dos2unix` uses in the `format` command because Pretter is now handling the end of line options.
This commit is contained in:
parent
e8f292279e
commit
35c4089160
104
.github/ISSUE_TEMPLATE.md
vendored
104
.github/ISSUE_TEMPLATE.md
vendored
@ -1,52 +1,52 @@
|
|||||||
_[Please make sure you have read the submission guidelines before posting an issue](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-issue)_
|
_[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
|
# Prerequisites
|
||||||
|
|
||||||
Please answer the following questions for yourself before submitting an issue.
|
Please answer the following questions for yourself before submitting an issue.
|
||||||
**YOU MAY DELETE THE PREREQUISITES SECTION.**
|
**YOU MAY DELETE THE PREREQUISITES SECTION.**
|
||||||
|
|
||||||
- [ ] I am running the latest version
|
- [ ] I am running the latest version
|
||||||
- [ ] I checked the documentation and found no answer
|
- [ ] I checked the documentation and found no answer
|
||||||
- [ ] I checked to make sure that this issue has not already been filed
|
- [ ] 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 Angular, AngularCLI or any dependency)
|
- [ ] I'm reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)
|
||||||
|
|
||||||
## Expected Behavior
|
## Expected Behavior
|
||||||
|
|
||||||
Please describe the behavior you are expecting
|
Please describe the behavior you are expecting
|
||||||
|
|
||||||
## Current Behavior
|
## Current Behavior
|
||||||
|
|
||||||
What is the current behavior?
|
What is the current behavior?
|
||||||
|
|
||||||
## Failure Information (for bugs)
|
## 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.
|
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
|
### Steps to Reproduce
|
||||||
|
|
||||||
Please provide detailed steps for reproducing the issue.
|
Please provide detailed steps for reproducing the issue.
|
||||||
|
|
||||||
1. step 1
|
1. step 1
|
||||||
2. step 2
|
2. step 2
|
||||||
3. ...
|
3. ...
|
||||||
|
|
||||||
### Context
|
### Context
|
||||||
|
|
||||||
Please provide any relevant information about your setup:
|
Please provide any relevant information about your setup:
|
||||||
|
|
||||||
- version of Nx used
|
- version of Nx used
|
||||||
- version of Angular CLI used
|
- version of Angular CLI used
|
||||||
- `angular.json` configuration
|
- `angular.json` configuration
|
||||||
- version of Angular DevKit used
|
- version of Angular DevKit used
|
||||||
- 3rd-party libraries and their versions
|
- 3rd-party libraries and their versions
|
||||||
- and most importantly - a use-case that fails
|
- and most importantly - a use-case that fails
|
||||||
|
|
||||||
**A minimal reproduce scenario using allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.**
|
**A minimal reproduce scenario using 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
|
### Failure Logs
|
||||||
|
|
||||||
Please include any relevant log snippets or files here.
|
Please include any relevant log snippets or files here.
|
||||||
|
|
||||||
## Other
|
## Other
|
||||||
|
|
||||||
Any other relevant information that will help us help you.
|
Any other relevant information that will help us help you.
|
||||||
|
|||||||
24
.github/ISSUE_TEMPLATE/feature.md
vendored
24
.github/ISSUE_TEMPLATE/feature.md
vendored
@ -1,12 +1,12 @@
|
|||||||
## Description
|
## Description
|
||||||
|
|
||||||
Description the change you would like to have.
|
Description the change you would like to have.
|
||||||
|
|
||||||
## Suggested implementation
|
## Suggested implementation
|
||||||
|
|
||||||
How do you think it can be done?
|
How do you think it can be done?
|
||||||
|
|
||||||
## Describe alternatives
|
## Describe alternatives
|
||||||
|
|
||||||
Do you have considered any alternative?
|
Do you have considered any alternative?
|
||||||
Teachability, Documentation, Adoption, Migration Strategy...
|
Teachability, Documentation, Adoption, Migration Strategy...
|
||||||
|
|||||||
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,7 +1,7 @@
|
|||||||
_[Please make sure you have read the submission guidelines before posting an PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-pr)_
|
_[Please make sure you have read the submission guidelines before posting an PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-pr)_
|
||||||
|
|
||||||
## Current Behavior (This is the behavior we have today, before the PR is merged)
|
## 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)
|
## Expected Behavior (This is the new behavior we can expect after the PR is merged)
|
||||||
|
|
||||||
## Issue
|
## Issue
|
||||||
|
|||||||
134
.github/SAVED_REPLIES.md
vendored
134
.github/SAVED_REPLIES.md
vendored
@ -1,67 +1,67 @@
|
|||||||
# Saved Responses for Nx's Issue Tracker
|
# Saved Responses for Nx's Issue Tracker
|
||||||
|
|
||||||
The following are canned responses that the Nx team should use to close issues on our issue tracker that fall into the listed resolution categories.
|
The following are canned responses that the Nx team should use to close issues on our issue tracker that fall into the listed resolution categories.
|
||||||
|
|
||||||
Since GitHub currently doesn't allow us to have a repository-wide or organization-wide list of [saved replies](https://help.github.com/articles/working-with-saved-replies/), these replies need to be maintained by individual team members. Since the responses can be modified in the future, all responses are versioned to simplify the process of keeping the responses up to date.
|
Since GitHub currently doesn't allow us to have a repository-wide or organization-wide list of [saved replies](https://help.github.com/articles/working-with-saved-replies/), these replies need to be maintained by individual team members. Since the responses can be modified in the future, all responses are versioned to simplify the process of keeping the responses up to date.
|
||||||
|
|
||||||
## Nx: Already Fixed
|
## Nx: Already Fixed
|
||||||
|
|
||||||
```
|
```
|
||||||
Thanks for reporting this issue. Luckily, it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.
|
Thanks for reporting this issue. Luckily, it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.
|
||||||
|
|
||||||
If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use `create-nx-workspace my-issue` and then `ng g app my-app` to create a new project where you reproduce the problem.
|
If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use `create-nx-workspace my-issue` and then `ng g app my-app` to create a new project where you reproduce the problem.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Nx: Don't Understand
|
## Nx: Don't Understand
|
||||||
|
|
||||||
```
|
```
|
||||||
I'm sorry, but we don't understand the problem you are reporting.
|
I'm sorry, but we don't understand the problem you are reporting.
|
||||||
|
|
||||||
Please provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use `create-nx-workspace my-issue` to create a new project where you reproduce the problem.
|
Please provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use `create-nx-workspace my-issue` to create a new project where you reproduce the problem.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Nx: Duplicate
|
## Nx: Duplicate
|
||||||
|
|
||||||
```
|
```
|
||||||
Thanks for reporting this issue. However, this issue is a duplicate of #<ISSUE_NUMBER>. Please subscribe to that issue for future updates.
|
Thanks for reporting this issue. However, this issue is a duplicate of #<ISSUE_NUMBER>. Please subscribe to that issue for future updates.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Nx: Insufficient Information Provided
|
## Nx: Insufficient Information Provided
|
||||||
|
|
||||||
```
|
```
|
||||||
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out [our submission guidelines](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-an-issue) to understand why we can't act on issues that are lacking important information.
|
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out [our submission guidelines](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-an-issue) to understand why we can't act on issues that are lacking important information.
|
||||||
|
|
||||||
Please ensure you provide all of the required information when filling out the issue template.
|
Please ensure you provide all of the required information when filling out the issue template.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Nx: NPM install issue
|
## Nx: NPM install issue
|
||||||
|
|
||||||
```
|
```
|
||||||
This seems like a problem with your node/npm and not with Nx.
|
This seems like a problem with your node/npm and not with Nx.
|
||||||
|
|
||||||
Please have a look at the [fixing npm permissions page](https://docs.npmjs.com/getting-started/fixing-npm-permissions), [common errors page](https://docs.npmjs.com/troubleshooting/common-errors), [npm issue tracker](https://github.com/npm/npm/issues), or open a new issue if the problem you are experiencing isn't known.
|
Please have a look at the [fixing npm permissions page](https://docs.npmjs.com/getting-started/fixing-npm-permissions), [common errors page](https://docs.npmjs.com/troubleshooting/common-errors), [npm issue tracker](https://github.com/npm/npm/issues), or open a new issue if the problem you are experiencing isn't known.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Nx: Issue Outside of Nx
|
## Nx: Issue Outside of Nx
|
||||||
|
|
||||||
```
|
```
|
||||||
I'm sorry, but this issue is not caused by Nx. Please contact the author(s) of the <PROJECT NAME> project or file an issue on their issue tracker.
|
I'm sorry, but this issue is not caused by Nx. Please contact the author(s) of the <PROJECT NAME> project or file an issue on their issue tracker.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Nx: Non-reproducible
|
## Nx: Non-reproducible
|
||||||
|
|
||||||
```
|
```
|
||||||
I'm sorry, but we can't reproduce the problem following the instructions you provided.
|
I'm sorry, but we can't reproduce the problem following the instructions you provided.
|
||||||
Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue.
|
Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue.
|
||||||
Short, explicit instructions make it much more likely we'll be able to reproduce the problem so we can fix it.
|
Short, explicit instructions make it much more likely we'll be able to reproduce the problem so we can fix it.
|
||||||
|
|
||||||
A good way to make a minimal repro is to create a new app via `create-nx-workspace my-issue` and then `ng g app my-app` and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
|
A good way to make a minimal repro is to create a new app via `create-nx-workspace my-issue` and then `ng g app my-app` and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Nx: Obsolete
|
## Nx: Obsolete
|
||||||
|
|
||||||
```
|
```
|
||||||
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Nx version.
|
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Nx version.
|
||||||
|
|
||||||
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
|
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
|
||||||
```
|
```
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"singleQuote": true
|
"singleQuote": true,
|
||||||
|
"endOfLine": "lf"
|
||||||
}
|
}
|
||||||
932
CHANGELOG.md
932
CHANGELOG.md
@ -1,466 +1,466 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## Please use the [Github Releases](https://github.com/nrwl/nx/releases) page to see the changelog.
|
## Please use the [Github Releases](https://github.com/nrwl/nx/releases) page to see the changelog.
|
||||||
|
|
||||||
# 1.0.1
|
# 1.0.1
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- **schematic:** add a migration to add tsconfig.tools.json ([c18baf0](https://github.com/nrwl/nx/commit/c18baf0))
|
- **schematic:** add a migration to add tsconfig.tools.json ([c18baf0](https://github.com/nrwl/nx/commit/c18baf0))
|
||||||
|
|
||||||
# 1.0.0
|
# 1.0.0
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- **schematics:** dep-graph visual style for affected lib ([8ca8548](https://github.com/nrwl/nx/commit/8ca8548))
|
- **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:** 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:** 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:** 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))
|
- **schematics:** ignore errors when the tools directory already exists ([2a377fe](https://github.com/nrwl/nx/commit/2a377fe))
|
||||||
|
|
||||||
# 0.11.0
|
# 0.11.0
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Support to generate visualization graph](https://github.com/nrwl/nx/commit/49525efe3e31ff93dccf68499300fe35deaac78f)
|
- [Support to generate visualization graph](https://github.com/nrwl/nx/commit/49525efe3e31ff93dccf68499300fe35deaac78f)
|
||||||
|
|
||||||
# 0.10.1
|
# 0.10.1
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Add support for workspace-specific schematics](https://github.com/nrwl/nx/commit/bc559575f524aacbe3d25eb97210101e60de4526)
|
- [Add support for workspace-specific schematics](https://github.com/nrwl/nx/commit/bc559575f524aacbe3d25eb97210101e60de4526)
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- [Extend ngrx and Angular schematics](https://github.com/nrwl/nx/commit/0c2b01bda6904e09f0c4f997ef4a98818723b795)
|
- [Extend ngrx and Angular schematics](https://github.com/nrwl/nx/commit/0c2b01bda6904e09f0c4f997ef4a98818723b795)
|
||||||
|
|
||||||
# 0.10.0
|
# 0.10.0
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Use npm-run-all to run build in parallel](https://github.com/nrwl/nx/commit/7b63de662e3aa99a8688681f0e26518ca05ffcbc)
|
- [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)
|
- [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 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)
|
- [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)
|
- [Affected support for uncommitted changes](https://github.com/nrwl/nx/commit/113b51bd330c2af058675386e482d38f170a6688)
|
||||||
- [Extend circular dependency check](https://github.com/nrwl/nx/commit/fff9659c3a108b613c6db89bcca4072494fbe85f)
|
- [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)
|
- [Add lint checks ensuring the integrity of the workspace](https://github.com/nrwl/nx/commit/ce553b732e8ca004e1ecf53cf54bcadb6ba1f7f3)
|
||||||
- [Add ability to create bazel workspace](https://github.com/nrwl/nx/commit/5a26f241b1e8b8b87e2ab4da941d3d3c4c480046)
|
- [Add ability to create bazel workspace](https://github.com/nrwl/nx/commit/5a26f241b1e8b8b87e2ab4da941d3d3c4c480046)
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- [Fix the absolute import check](https://github.com/nrwl/nx/commit/de138bb26cb816b86afe6b8f14abb362cec2a20e)
|
- [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)
|
- [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)
|
- [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)
|
- [Handle undefined rulesDirectory](https://github.com/nrwl/nx/commit/8beae9fa3d6d905778dd24c5e6b27fe7c534be13)
|
||||||
- [Add appRoot.path for filesystem reads/writes](https://github.com/nrwl/nx/commit/809bdd4c270baf7fd883980db8d7171ebf09508e)
|
- [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)
|
- [Correct docstring for affected](https://github.com/nrwl/nx/commit/6394f9e1edf5a0b1f219050dc8b1e8269d5e5c2b)
|
||||||
- [Update karma conf with app check](https://github.com/nrwl/nx/commit/fea4f48decdfa17feb5e020318abf2ac319d05da)
|
- [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)
|
- [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)
|
- [Match ng lib and update versions ](https://github.com/nrwl/nx/commit/8482177b7373844d833aaad55e15a2a10d4ae116)
|
||||||
|
|
||||||
# 0.9.0
|
# 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.
|
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:
|
When creating an app or a lib, you can tag them:
|
||||||
|
|
||||||
```
|
```
|
||||||
ng g lib apilib --tags=api
|
ng g lib apilib --tags=api
|
||||||
ng g lib utilslib --tags=utils
|
ng g lib utilslib --tags=utils
|
||||||
ng g lib impllib --tags=impl
|
ng g lib impllib --tags=impl
|
||||||
ng g lib untaggedlib
|
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 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:
|
You can then define constraints in `tslint.json`, like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
"nx-enforce-module-boundaries": [
|
"nx-enforce-module-boundaries": [
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
"allow": [],
|
"allow": [],
|
||||||
"depConstraints": [
|
"depConstraints": [
|
||||||
{ "sourceTag": "utils", "onlyDependOnLibsWithTags": ["utils"] },
|
{ "sourceTag": "utils", "onlyDependOnLibsWithTags": ["utils"] },
|
||||||
{ "sourceTag": "api", "onlyDependOnLibsWithTags": ["api", "utils"] },
|
{ "sourceTag": "api", "onlyDependOnLibsWithTags": ["api", "utils"] },
|
||||||
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["api", "utils", "impl"] },
|
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["api", "utils", "impl"] },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
With this configuration in place:
|
With this configuration in place:
|
||||||
|
|
||||||
- `utilslib` can depend on no libs.
|
- `utilslib` can depend on no libs.
|
||||||
- `apilib` can depend on `utilslib`
|
- `apilib` can depend on `utilslib`
|
||||||
- `implib` can depend on both `utilslib` and `apilib`.
|
- `implib` can depend on both `utilslib` and `apilib`.
|
||||||
- `untaggedlib` can depend on no libs.
|
- `untaggedlib` can depend on no libs.
|
||||||
|
|
||||||
This gets really useful once you have multiple libs with the same tag.
|
This gets really useful once you have multiple libs with the same tag.
|
||||||
|
|
||||||
You can also use wildcards, like this:
|
You can also use wildcards, like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["*"] } // impl can depend on anything
|
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["*"] } // impl can depend on anything
|
||||||
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] } // anything 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.
|
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:
|
If we change the configuration to the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
"nx-enforce-module-boundaries": [
|
"nx-enforce-module-boundaries": [
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
"allow": [],
|
"allow": [],
|
||||||
"depConstraints": [
|
"depConstraints": [
|
||||||
{ "sourceTag": "utils", "onlyDependOnLibsWithTags": ["utils"] },
|
{ "sourceTag": "utils", "onlyDependOnLibsWithTags": ["utils"] },
|
||||||
{ "sourceTag": "api", "onlyDependOnLibsWithTags": ["api", "utils"] },
|
{ "sourceTag": "api", "onlyDependOnLibsWithTags": ["api", "utils"] },
|
||||||
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["api", "utils", "impl"] },
|
{ "sourceTag": "impl", "onlyDependOnLibsWithTags": ["api", "utils", "impl"] },
|
||||||
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] },
|
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
The following will be true.
|
The following will be true.
|
||||||
|
|
||||||
- `utilslib` can depend on no libs.
|
- `utilslib` can depend on no libs.
|
||||||
- `apilib` can depend on `utilslib`
|
- `apilib` can depend on `utilslib`
|
||||||
- `implib` can depend on both `utilslib` and `apilib`.
|
- `implib` can depend on both `utilslib` and `apilib`.
|
||||||
- `untaggedlib` can depend on **all** libs.
|
- `untaggedlib` can depend on **all** libs.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Cache the dependency graph to speed up "ng lint"](https://github.com/nrwl/nx/commit/93ecf24bdadfa7ae28cf802b4f3193390858db90)
|
- [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 lint check for circular deps](https://github.com/nrwl/nx/commit/53175f925e804539aacba8323af159d69205ddac)
|
||||||
- [Add support for tagged libs](https://github.com/nrwl/nx/commit/2842cb9c387226c24c0a42a154f3c65059d730f3)
|
- [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)
|
- [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)
|
- [Allow users to set prettier config](https://github.com/nrwl/nx/commit/56a6611575fee7b111655d2223f3e30ea684d000)
|
||||||
- [Add store-freeze support](https://github.com/nrwl/nx/commit/e21caa0143862059d4b1089ccf3a7e3799cef0f2)
|
- [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)
|
- [Extend the nrwl schematics from the angular cli schematics](https://github.com/nrwl/nx/commit/04f8e2fd4613aff4064123cacd8eb54e1da09a60)
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- [Improve windows compatibility](https://github.com/nrwl/nx/commit/4f052bb3e60f20d0d676f283de2e2faece0dcef8)
|
- [Improve windows compatibility](https://github.com/nrwl/nx/commit/4f052bb3e60f20d0d676f283de2e2faece0dcef8)
|
||||||
- [Dasherize the state folder](https://github.com/nrwl/nx/commit/b17b186186ea5617b1b953f1ddd4ab05ebfa7d92)
|
- [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 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)
|
- [Fix protractor.conf.js schema](https://github.com/nrwl/nx/commit/37cabafb35980ce8e991abc1269387b3aaaf9f25)
|
||||||
|
|
||||||
# 0.8.0
|
# 0.8.0
|
||||||
|
|
||||||
## Features
|
## 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.
|
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)
|
- [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)
|
- [Add update, update:skip, and update:check commands](https://github.com/nrwl/nx/commit/2fb62597514f1c82e4d80d75a7d60d11229d5aa3)
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- [Fix format:write --libs-and-apps](https://github.com/nrwl/nx/commit/feeaba1a4b8d827a71731d919740135464d6e049)
|
- [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)
|
- [Change format to default to format-all when no patterns are detected](https://github.com/nrwl/nx/commit/58e99ab04d8e9505285bdcf31014f3774a6f900a)
|
||||||
|
|
||||||
## Cleanup
|
## Cleanup
|
||||||
|
|
||||||
- [Remove the version property](https://github.com/nrwl/nx/commit/24063f02464b6da38e003841e04820dcc347e876)
|
- [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)
|
- [Use schematic context to format the generated code](https://github.com/nrwl/nx/commit/e7481a790f5becffc46e794ec46c0835a2114319)
|
||||||
|
|
||||||
# 0.7.4
|
# 0.7.4
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Change generate effect tests to use toBeObservable](https://github.com/nrwl/nx/commit/222efe2f2630b02f6fdb11f560c9158cd4f51d75)
|
- [Change generate effect tests to use toBeObservable](https://github.com/nrwl/nx/commit/222efe2f2630b02f6fdb11f560c9158cd4f51d75)
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- [Base projectPath on the full path instead of the current working directory of the process](https://github.com/nrwl/nx/commit/545f2ff13902a635b9c26854e9687790adff0616)
|
- [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)
|
- [Ammend command in script errors](https://github.com/nrwl/nx/commit/9128fa8be1e31525acb6043ff87af73b6b884aaa)
|
||||||
|
|
||||||
# 0.7.2
|
# 0.7.2
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Added a post install script that run nx-migrate:check](https://github.com/nrwl/nx/commit/93a6b4e94be4b1b591eb017e77b79c777bc23deb)
|
- [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)
|
- [Updated create-nx-workspace to support yarn](https://github.com/nrwl/nx/commit/e5b247b573cef0c1cf5cc5163d030dbf514f4dff)
|
||||||
|
|
||||||
## Cleanup
|
## Cleanup
|
||||||
|
|
||||||
- [Cleaned up the output of nx-migrate](https://github.com/nrwl/nx/commit/7ab14e3b26e0e91d660ad5bb454dccb21b9745cf)
|
- [Cleaned up the output of nx-migrate](https://github.com/nrwl/nx/commit/7ab14e3b26e0e91d660ad5bb454dccb21b9745cf)
|
||||||
|
|
||||||
# 0.7.0
|
# 0.7.0
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Add nx-migrate:check and nx-migrate:skip scripts](d7ba9fdc1b9f4208db6de32184e953d00f6f064f)
|
- [Add nx-migrate:check and nx-migrate:skip scripts](d7ba9fdc1b9f4208db6de32184e953d00f6f064f)
|
||||||
|
|
||||||
# 0.7.0-beta.1
|
# 0.7.0-beta.1
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Switch to Angular 5.2 and CLI 1.6.5](https://github.com/nrwl/nx/commit/172c18dc9b84f7ac3019694e4a0eeeb40dd1bc26)
|
- [Switch to Angular 5.2 and CLI 1.6.5](https://github.com/nrwl/nx/commit/172c18dc9b84f7ac3019694e4a0eeeb40dd1bc26)
|
||||||
|
|
||||||
# 0.6.18
|
# 0.6.18
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [Fixed affected: commands. Continue traversing within irrelevant PropertyAssignment nodes](https://github.com/nrwl/nx/commit/2293e28bd031efa80566228dddc202bc437c2b03)
|
- [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)
|
- [Make affected and format windows-friendly](https://github.com/nrwl/nx/commit/9609fc675031bd4dca285ceb942a71d995d1ee7b)
|
||||||
|
|
||||||
## Cleanup
|
## Cleanup
|
||||||
|
|
||||||
- [Clean up tslint configuration](https://github.com/nrwl/nx/commit/828e4fe75da66dc41790e55a7738192940a04cbf)
|
- [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)
|
- [Add a migration updating the version of prettier](https://github.com/nrwl/nx/commit/847a249980c3505845a8c597de8e9a3d78766f8b)
|
||||||
|
|
||||||
# 0.6.13
|
# 0.6.13
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [Avoid relative paths to node modules](https://github.com/nrwl/nx/commit/2c49c3029535a9b98216d367e9c2b77a8d40a4a4)
|
- [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)
|
- [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
|
# 0.6.10
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Improve error messages in the affected: and format: commands](https://github.com/nrwl/nx/commit/878784ae814ffea28796f458ff2f8b0b641996c0)
|
- [Improve error messages in the affected: and format: commands](https://github.com/nrwl/nx/commit/878784ae814ffea28796f458ff2f8b0b641996c0)
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [Handle circular deps between apps and libs](https://github.com/nrwl/nx/commit/3531323fb5210b995b1296a198c8e76ee8bf9a07)
|
- [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)
|
- [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 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)
|
- [Update workspace to copy the cli file](https://github.com/nrwl/nx/commit/ddd8de3813f374a752b0e6f47deaa58c2e9f40c8)
|
||||||
- [Disallow importing apps](https://github.com/nrwl/nx/commit/912fc81708d381f49950255eeff746a2dfd46c7b)
|
- [Disallow importing apps](https://github.com/nrwl/nx/commit/912fc81708d381f49950255eeff746a2dfd46c7b)
|
||||||
|
|
||||||
# 0.6.5
|
# 0.6.5
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
This release adds the following commands:
|
This release adds the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run format:write -- SHA1 SHA2
|
npm run format:write -- SHA1 SHA2
|
||||||
npm run format:check -- 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.
|
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:
|
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:write -- --files="libs/mylib/index.ts,libs/mylib2/index.ts"
|
||||||
npm run format:check -- --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.
|
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:write -- SHA1 SHA2 --libs-and-apps
|
||||||
npm run format:check -- 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:
|
Finally, you can the command on the whole repo, like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run format:write
|
npm run format:write
|
||||||
npm run format:check
|
npm run format:check
|
||||||
```
|
```
|
||||||
|
|
||||||
- [Add format:check and format:write commands](https://github.com/nrwl/nx/commit/826a0b1056f9000425e189bad5a5d63966c3a704)
|
- [Add format:check and format:write commands](https://github.com/nrwl/nx/commit/826a0b1056f9000425e189bad5a5d63966c3a704)
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [Only allow importing libs using the configured npm scope](https://github.com/nrwl/nx/commit/c836668541532e64db088ef9a984678022abb3bd)
|
- [Only allow importing libs using the configured npm scope](https://github.com/nrwl/nx/commit/c836668541532e64db088ef9a984678022abb3bd)
|
||||||
|
|
||||||
# 0.6.0
|
# 0.6.0
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
This release adds the following commands:
|
This release adds the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run apps:affected -- SHA1 SHA2
|
npm run apps:affected -- SHA1 SHA2
|
||||||
npm run build:affected -- SHA1 SHA2
|
npm run build:affected -- SHA1 SHA2
|
||||||
npm run e2e: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.
|
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.
|
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:
|
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 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 build:affected ----files="libs/mylib/index.ts,libs/mylib2/index.ts"
|
||||||
npm run e2e: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)
|
- [Add support for building and testing only the apps affected by a commit](https://github.com/nrwl/nx/commit/428762664acc5fd155dd7be630dab09101d23542)
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [Make deep import check work for libs with same prefix](https://github.com/nrwl/nx/commit/3c55f34ca12a4d5338099586ffe9455c81a3b199)
|
- [Make deep import check work for libs with same prefix](https://github.com/nrwl/nx/commit/3c55f34ca12a4d5338099586ffe9455c81a3b199)
|
||||||
|
|
||||||
# 0.5.3
|
# 0.5.3
|
||||||
|
|
||||||
`ng new myproj --collection=@nrwl/schematics` creates a new workspace.
|
`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.
|
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:
|
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
|
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 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:
|
This is what you can do now:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn global add @nrwl/schematics # do it once
|
yarn global add @nrwl/schematics # do it once
|
||||||
create-nx-workspace myproj
|
create-nx-workspace myproj
|
||||||
```
|
```
|
||||||
|
|
||||||
Some folks also reported having problems running Nx behind a firewall, in a corporate environment. We fixed them as well.
|
Some folks also reported having problems running Nx behind a firewall, in a corporate environment. We fixed them as well.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Replace install.sh with a more robust way of creating projects](https://github.com/nrwl/nx/commit/f91b5309bdaf764e436bd544ec4f10c84b99cb08)
|
- [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)
|
- [Bump up the version of prettier](https://github.com/nrwl/nx/commit/1481d169bbb7f1fbe3df5af2bce51c4215776d93)
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [Generate an angular-cli config without the apps array, so the CLI can error properly](https://github.com/nrwl/nx/commit/a7f06edf5914212bcefbafb1198d262e9692cfdb)
|
- [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
|
# 0.5.2
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [Remove default prop for viewEncapsulation option flag](https://github.com/nrwl/nx/commit/b46eb1c699dd509f4be103979a5938c3f7486fb1)
|
- [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)
|
- [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)
|
- [Change rxjs version to use hat](https://github.com/nrwl/nx/commit/3b1942ed830ea31269a1fb9e995efb93b182870a)
|
||||||
|
|
||||||
# 0.5.1
|
# 0.5.1
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Disable typescript mismatch warnings](https://github.com/nrwl/nx/commit/ecb87a0dcd08f0968d77508976ce43a84f049743)
|
- [Disable typescript mismatch warnings](https://github.com/nrwl/nx/commit/ecb87a0dcd08f0968d77508976ce43a84f049743)
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- ["ng test" should not compile e2e tests](https://github.com/nrwl/nx/commit/ac53e9a624b01cf71f88eb412678ffc48125ff38)
|
- ["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)
|
- [Fix 'npm run format'](https://github.com/nrwl/nx/commit/670cd57dfa7d5bbf6b9af4e52f2c7d40081138cb)
|
||||||
|
|
||||||
# 0.5.0
|
# 0.5.0
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Update the workspace to use Angular 5.1 and CLI 1.6](https://github.com/nrwl/nx/commit/a477bb9fc953e3b44d696945cc259119f701fb78)
|
- [Update the workspace to use Angular 5.1 and CLI 1.6](https://github.com/nrwl/nx/commit/a477bb9fc953e3b44d696945cc259119f701fb78)
|
||||||
|
|
||||||
# 0.4.0
|
# 0.4.0
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Add support for generating nested apps and libs](https://github.com/nrwl/nx/commit/013a828d1e31f55a9b3f7c69587316890ea834d4)
|
- [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)
|
- [Update NgRx schematic to allow the customization of the state folder](https://github.com/nrwl/nx/commit/a2d02652665f497be8958efc403d7a44bd831088)
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [Only begin converting to workspace once files have been checked](https://github.com/nrwl/nx/commit/e7fd6b1e04f3f3387a91c53a7ac479fe72bdd72e)
|
- [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)
|
- ["ng build" should only recompile the selected app](https://github.com/nrwl/nx/commit/550de7bb80f4d3f306c23fac70db52c98dadcd05)
|
||||||
|
|
||||||
## Refactoring
|
## Refactoring
|
||||||
|
|
||||||
- [Eliminated single letter variable names in effects template](https://github.com/nrwl/nx/commit/996143cf60bac1a57629815d5756db9ce23193ab)
|
- [Eliminated single letter variable names in effects template](https://github.com/nrwl/nx/commit/996143cf60bac1a57629815d5756db9ce23193ab)
|
||||||
|
|
||||||
# 0.3.0
|
# 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.
|
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
|
## Features
|
||||||
|
|
||||||
- [add `allow` option to whitelist deep imports](https://github.com/nrwl/nx/commit/b3f67351fe8890e06402672e687b1789f279613b)
|
- [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)
|
- [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)
|
- [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)
|
- [Update readme to point to example apps using Nx](https://github.com/nrwl/nx/commit/3d53e31391d5d79a0724d099c7121edb53e8b163)
|
||||||
|
|
||||||
# 0.2.2
|
# 0.2.2
|
||||||
|
|
||||||
## Bug Fixes
|
## 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)
|
- [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)
|
- [Fix issue with generating a wrong full path on windows](https://github.com/nrwl/nx/commit/11e6c055ba1211a5bee1cc73d46663985645f08e)
|
||||||
|
|
||||||
# 0.2.1
|
# 0.2.1
|
||||||
|
|
||||||
## New Features
|
## New Features
|
||||||
|
|
||||||
- [Export jasmine-marbles getTestScheduler and time functions](https://github.com/nrwl/nx/commit/2e4613f475fc2673731540fb4724d6ba2af02aae)
|
- [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)
|
- [Use fetch instead of optimisticUpdate in the generated effect classes](https://github.com/nrwl/nx/commit/c9759cc4427283422e906ed19a8a2dabcb2a656b)
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
- [--routing should add RouterTestingModule](https://github.com/nrwl/nx/commit/d7fc5b56054c9a4c1fbb12845bfc0803f9a9ff86)
|
- [--routing should add RouterTestingModule](https://github.com/nrwl/nx/commit/d7fc5b56054c9a4c1fbb12845bfc0803f9a9ff86)
|
||||||
- [Fix wording in the documentation](https://github.com/nrwl/nx/commit/058c8995f35a9e677f88404bc9c8a2b177487080)
|
- [Fix wording in the documentation](https://github.com/nrwl/nx/commit/058c8995f35a9e677f88404bc9c8a2b177487080)
|
||||||
|
|
||||||
## Refactorings
|
## Refactorings
|
||||||
|
|
||||||
- [Refactor Nx to use RxJS lettable operators](https://github.com/nrwl/nx/commit/715efa4b225b65be0052a1e6a88c5bdcd5a6cf38)
|
- [Refactor Nx to use RxJS lettable operators](https://github.com/nrwl/nx/commit/715efa4b225b65be0052a1e6a88c5bdcd5a6cf38)
|
||||||
|
|
||||||
# 0.2.0
|
# 0.2.0
|
||||||
|
|
||||||
## New Features
|
## New Features
|
||||||
|
|
||||||
### Changing Default Library Type
|
### Changing Default Library Type
|
||||||
|
|
||||||
We changed the default library type from "simple" to "Angular". So where previously you would run:
|
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 // simple TS library
|
||||||
ng generate lib mylib --ngmodule // an angular library
|
ng generate lib mylib --ngmodule // an angular library
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, you run:
|
Now, you run:
|
||||||
|
|
||||||
```
|
```
|
||||||
ng generate lib mylib // an angular library
|
ng generate lib mylib // an angular library
|
||||||
ng generate lib mylib --nomodule // simple ts library
|
ng generate lib mylib --nomodule // simple ts library
|
||||||
```
|
```
|
||||||
|
|
||||||
### Generating Router Configuration
|
### Generating Router Configuration
|
||||||
|
|
||||||
You can pass `--routing` when generating an app.
|
You can pass `--routing` when generating an app.
|
||||||
|
|
||||||
```
|
```
|
||||||
ng generate app myapp --routing // generate an angular app with router config
|
ng generate app myapp --routing // generate an angular app with router config
|
||||||
```
|
```
|
||||||
|
|
||||||
The generated app will have `RouterModule.forRoot` configured.
|
The generated app will have `RouterModule.forRoot` configured.
|
||||||
|
|
||||||
You can also pass it when generating a library, like this:
|
You can also pass it when generating a library, like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
ng generate lib mylib --routing
|
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.
|
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.
|
You can add the `--lazy` to generate a library that is loaded lazily.
|
||||||
|
|
||||||
```
|
```
|
||||||
ng generate lib mylib --routing --lazy
|
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.
|
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.
|
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 --parentModule=apps/myapp/src/myapp.module.ts
|
||||||
ng generate lib mylib --routing --lazy --parentModule=apps/myapp/src/myapp.module.ts
|
ng generate lib mylib --routing --lazy --parentModule=apps/myapp/src/myapp.module.ts
|
||||||
```
|
```
|
||||||
|
|||||||
284
CONTRIBUTING.md
284
CONTRIBUTING.md
@ -1,142 +1,142 @@
|
|||||||
# Contributing to Nx
|
# Contributing to Nx
|
||||||
|
|
||||||
We would love for you to contribute to Nx! Read this document to see how to do it.
|
We would love for you to contribute to Nx! Read this document to see how to do it.
|
||||||
|
|
||||||
## Got a Question?
|
## Got a Question?
|
||||||
|
|
||||||
We are trying to keep GitHub issues for bug reports and feature requests. Stack Overflow 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. Stack Overflow is a much better place to ask general questions about how to use Nx.
|
||||||
|
|
||||||
## Found an Issue?
|
## 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.
|
||||||
|
|
||||||
## Building the Project
|
## Building the Project
|
||||||
|
|
||||||
After cloning the project run: `yarn`.
|
After cloning the project run: `yarn`.
|
||||||
|
|
||||||
After that run `yarn build` to build the `bazel`, `nx`, and `schematics` packages.
|
After that run `yarn build` to build the `bazel`, `nx`, and `schematics` packages.
|
||||||
|
|
||||||
After that run `yarn linknpm`.
|
After that run `yarn linknpm`.
|
||||||
|
|
||||||
### Running Unit Tests
|
### Running Unit Tests
|
||||||
|
|
||||||
To make sure your changes do not break any unit tests, run the following:
|
To make sure your changes do not break any unit tests, run the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn test
|
yarn test
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also run `yarn test:schematics` and `yarn test:nx` to test the schematics and nx packages individually.
|
You can also run `yarn test:schematics` and `yarn test:nx` to test the schematics and nx packages individually.
|
||||||
|
|
||||||
If you need to test only the **collection/ngrx.spec.ts** test [for example], you can use an optional `$1` argument as follows:
|
If you need to test only the **collection/ngrx.spec.ts** test [for example], you can use an optional `$1` argument as follows:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn test:schematics schematics/src/collection/ngrx/ngrx
|
yarn test:schematics schematics/src/collection/ngrx/ngrx
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running E2E Tests
|
### Running E2E Tests
|
||||||
|
|
||||||
To make sure you changes do not break any unit tests, run the following:
|
To make sure you changes do not break any unit tests, run the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn e2e
|
yarn e2e
|
||||||
```
|
```
|
||||||
|
|
||||||
Running e2e tests can take some time, so it is often useful to run a single test. You can do it as follows:
|
Running e2e tests can take some time, so it is often useful to run a single test. You can do it as follows:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn e2e affected
|
yarn e2e affected
|
||||||
```
|
```
|
||||||
|
|
||||||
### Developing on Windows
|
### Developing on Windows
|
||||||
|
|
||||||
To build Nx on Windows, you need to use WSL.
|
To build Nx on Windows, you need to use WSL.
|
||||||
|
|
||||||
- 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 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:schematics` and other commands in WSL.
|
- Run `yarn test:schematics` and other commands in WSL.
|
||||||
|
|
||||||
## Submission Guidelines
|
## Submission Guidelines
|
||||||
|
|
||||||
### <a name="submit-issue"></a> Submitting an Issue
|
### <a name="submit-issue"></a> Submitting an Issue
|
||||||
|
|
||||||
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
|
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and 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 & forth to you with additional questions like:
|
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 & forth to you with additional questions like:
|
||||||
|
|
||||||
- version of Nx used
|
- version of Nx used
|
||||||
- version of Angular CLI used
|
- version of Angular CLI used
|
||||||
- `angular.json` configuration
|
- `angular.json` configuration
|
||||||
- version of Angular DevKit used
|
- version of Angular DevKit used
|
||||||
- 3rd-party libraries and their versions
|
- 3rd-party libraries and their versions
|
||||||
- and most importantly - a use-case that fails
|
- and most importantly - a use-case that fails
|
||||||
|
|
||||||
A minimal reproduce scenario using allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.
|
A minimal reproduce scenario using 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 reproduce scenario 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.
|
We will be insisting on a minimal reproduce scenario 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).
|
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
|
### <a name="submit-pr"></a> Submitting a PR
|
||||||
|
|
||||||
Please follow the following guidelines:
|
Please follow the following guidelines:
|
||||||
|
|
||||||
- Make sure unit tests pass
|
- Make sure unit tests pass
|
||||||
- Make sure e2e tests pass
|
- Make sure e2e tests pass
|
||||||
- Make sure you run `yarn format`
|
- Make sure you run `yarn format`
|
||||||
- Update your commit message to follow the guidelines below
|
- Update your commit message to follow the guidelines below
|
||||||
|
|
||||||
#### Commit Message Guidelines
|
#### Commit Message Guidelines
|
||||||
|
|
||||||
Commit message should follow the following format:
|
Commit message should follow the following format:
|
||||||
|
|
||||||
```
|
```
|
||||||
type(scope): subject
|
type(scope): subject
|
||||||
BLANK LINE
|
BLANK LINE
|
||||||
body
|
body
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Type
|
##### Type
|
||||||
|
|
||||||
The type must be one of the following:
|
The type must be one of the following:
|
||||||
|
|
||||||
- build
|
- build
|
||||||
- feat
|
- feat
|
||||||
- fix
|
- fix
|
||||||
- refactor
|
- refactor
|
||||||
- style
|
- style
|
||||||
- docs
|
- docs
|
||||||
- test
|
- test
|
||||||
|
|
||||||
##### Scope
|
##### Scope
|
||||||
|
|
||||||
The scope must be one of the following:
|
The scope must be one of the following:
|
||||||
|
|
||||||
- node - anything backend specific
|
- node - anything backend specific
|
||||||
- testing - anything related to jest or cypress
|
- testing - anything related to jest or cypress
|
||||||
- frontend - anything angular specific
|
- frontend - anything angular specific
|
||||||
- nx - dependency management, basic workspace structure, etc
|
- nx - dependency management, basic workspace structure, etc
|
||||||
|
|
||||||
##### Subject
|
##### Subject
|
||||||
|
|
||||||
The subject must contain a description of the change.
|
The subject must contain a description of the change.
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
```
|
```
|
||||||
feat(schematics): add an option to generate lazy-loadable modules
|
feat(schematics): add an option to generate lazy-loadable modules
|
||||||
|
|
||||||
`ng generate lib mylib --lazy` provisions the mylib project in tslint.json
|
`ng generate lib mylib --lazy` provisions the mylib project in tslint.json
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Commitizen
|
#### Commitizen
|
||||||
|
|
||||||
To simplify and automate the process of commiting with this format,
|
To simplify and automate the process of commiting with this format,
|
||||||
**Nx is a [Commitizen](https://github.com/commitizen/cz-cli) friendly repository**, just do `git add` and execute `yarn commit`.
|
**Nx is a [Commitizen](https://github.com/commitizen/cz-cli) friendly repository**, just do `git add` and execute `yarn commit`.
|
||||||
|
|
||||||
## Migrations
|
## Migrations
|
||||||
|
|
||||||
Nx allows users to automatically upgrade to the newest version of the package. If you are introducing a change that would require the users to upgrade their workspace, add a migration to `packages/schematics/migrations`.
|
Nx allows users to automatically upgrade to the newest version of the package. If you are introducing a change that would require the users to upgrade their workspace, add a migration to `packages/schematics/migrations`.
|
||||||
|
|
||||||
Migrations are named in the following fashion: `YYYYMMDD-name.ts` (e.g., 20171129-change-schema.ts).
|
Migrations are named in the following fashion: `YYYYMMDD-name.ts` (e.g., 20171129-change-schema.ts).
|
||||||
|
|
||||||
The `yarn nx-migrate` command will run all the migrations after the one encoded in .angular-cli.json.
|
The `yarn nx-migrate` command will run all the migrations after the one encoded in .angular-cli.json.
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
# Using Prettier
|
# Using Prettier
|
||||||
|
|
||||||
TBD
|
TBD
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
# Using Nx at Enterprises
|
# Using Nx at Enterprises
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
# Using Workspace Schematics
|
# Using Workspace Schematics
|
||||||
|
|||||||
146
karma.conf.js
146
karma.conf.js
@ -1,73 +1,73 @@
|
|||||||
module.exports = function(config) {
|
module.exports = function(config) {
|
||||||
const webpackConfig = {
|
const webpackConfig = {
|
||||||
node: {
|
node: {
|
||||||
fs: 'empty',
|
fs: 'empty',
|
||||||
global: true,
|
global: true,
|
||||||
crypto: 'empty',
|
crypto: 'empty',
|
||||||
tls: 'empty',
|
tls: 'empty',
|
||||||
net: 'empty',
|
net: 'empty',
|
||||||
process: true,
|
process: true,
|
||||||
module: false,
|
module: false,
|
||||||
clearImmediate: false,
|
clearImmediate: false,
|
||||||
setImmediate: false
|
setImmediate: false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '.',
|
basePath: '.',
|
||||||
|
|
||||||
// frameworks to use
|
// frameworks to use
|
||||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine'],
|
||||||
|
|
||||||
// list of files / patterns to load in the browser
|
// list of files / patterns to load in the browser
|
||||||
files: [{ pattern: 'build/test.js', watched: false }],
|
files: [{ pattern: 'build/test.js', watched: false }],
|
||||||
|
|
||||||
// list of files to exclude
|
// list of files to exclude
|
||||||
exclude: [],
|
exclude: [],
|
||||||
|
|
||||||
// preprocess matching files before serving them to the browser
|
// preprocess matching files before serving them to the browser
|
||||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'build/test.js': ['webpack']
|
'build/test.js': ['webpack']
|
||||||
},
|
},
|
||||||
|
|
||||||
reporters: ['dots'],
|
reporters: ['dots'],
|
||||||
|
|
||||||
webpack: webpackConfig,
|
webpack: webpackConfig,
|
||||||
|
|
||||||
webpackMiddleware: {
|
webpackMiddleware: {
|
||||||
stats: 'errors-only'
|
stats: 'errors-only'
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
require('karma-jasmine'),
|
require('karma-jasmine'),
|
||||||
require('karma-chrome-launcher'),
|
require('karma-chrome-launcher'),
|
||||||
require('karma-webpack')
|
require('karma-webpack')
|
||||||
],
|
],
|
||||||
|
|
||||||
// web server port
|
// web server port
|
||||||
port: 9876,
|
port: 9876,
|
||||||
|
|
||||||
// enable / disable colors in the output (reporters and logs)
|
// enable / disable colors in the output (reporters and logs)
|
||||||
colors: true,
|
colors: true,
|
||||||
|
|
||||||
// level of logging
|
// level of logging
|
||||||
logLevel: config.LOG_INFO,
|
logLevel: config.LOG_INFO,
|
||||||
|
|
||||||
// enable / disable watching file and executing tests whenever any file changes
|
// enable / disable watching file and executing tests whenever any file changes
|
||||||
autoWatch: true,
|
autoWatch: true,
|
||||||
|
|
||||||
customLaunchers: {
|
customLaunchers: {
|
||||||
Chrome_travis_ci: {
|
Chrome_travis_ci: {
|
||||||
base: 'Chrome',
|
base: 'Chrome',
|
||||||
flags: ['--no-sandbox']
|
flags: ['--no-sandbox']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
browsers: process.env.TRAVIS ? ['Chrome_travis_ci'] : ['Chrome'],
|
browsers: process.env.TRAVIS ? ['Chrome_travis_ci'] : ['Chrome'],
|
||||||
|
|
||||||
// Concurrency level
|
// Concurrency level
|
||||||
// how many browser should be started simultaneous
|
// how many browser should be started simultaneous
|
||||||
concurrency: Infinity
|
concurrency: Infinity
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,3 @@
|
|||||||
|
|
||||||
echo "Prettier"
|
echo "Prettier"
|
||||||
prettier "**/*.{ts,js,json,css,scss,md}" "!**/{__name__,__directory__}/**" --write
|
prettier "**/*.{ts,js,json,css,scss,md}" "!**/{__name__,__directory__}/**" --write
|
||||||
|
|
||||||
echo "Line endings"
|
|
||||||
find packages -type f -print0 | xargs -0 dos2unix
|
|
||||||
find scripts -type f -print0 | xargs -0 dos2unix
|
|
||||||
|
|||||||
58
test.ts
58
test.ts
@ -1,29 +1,29 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||||
import 'core-js/es7/reflect';
|
import 'core-js/es7/reflect';
|
||||||
import 'zone.js/dist/zone';
|
import 'zone.js/dist/zone';
|
||||||
import 'zone.js/dist/zone-testing';
|
import 'zone.js/dist/zone-testing';
|
||||||
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
platformBrowserDynamicTesting
|
platformBrowserDynamicTesting
|
||||||
} from '@angular/platform-browser-dynamic/testing';
|
} from '@angular/platform-browser-dynamic/testing';
|
||||||
|
|
||||||
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
||||||
declare const require: any;
|
declare const require: any;
|
||||||
|
|
||||||
// Prevent Karma from running prematurely.
|
// Prevent Karma from running prematurely.
|
||||||
declare const __karma__: any;
|
declare const __karma__: any;
|
||||||
__karma__.loaded = function() {};
|
__karma__.loaded = function() {};
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(
|
getTestBed().initTestEnvironment(
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
platformBrowserDynamicTesting()
|
platformBrowserDynamicTesting()
|
||||||
);
|
);
|
||||||
|
|
||||||
const context = (<any>require).context('./packages/nx', true, /\.spec\.js$/);
|
const context = (<any>require).context('./packages/nx', true, /\.spec\.js$/);
|
||||||
// And load the modules.
|
// And load the modules.
|
||||||
context.keys().map(context);
|
context.keys().map(context);
|
||||||
// Finally, start Karma to run the tests.
|
// Finally, start Karma to run the tests.
|
||||||
__karma__.start();
|
__karma__.start();
|
||||||
|
|||||||
@ -1,31 +1,31 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"outDir": "build",
|
"outDir": "build",
|
||||||
"typeRoots": ["node_modules/@types"],
|
"typeRoots": ["node_modules/@types"],
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": ["es2017"],
|
"lib": ["es2017"],
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@nrwl/schematics": ["./packages/schematics"],
|
"@nrwl/schematics": ["./packages/schematics"],
|
||||||
"@nrwl/schematics/*": ["./packages/schematics/*"]
|
"@nrwl/schematics/*": ["./packages/schematics/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"tmp",
|
"tmp",
|
||||||
"build",
|
"build",
|
||||||
"packages/bazel",
|
"packages/bazel",
|
||||||
"packages/schematics/src/*/files/**/*",
|
"packages/schematics/src/*/files/**/*",
|
||||||
"scripts"
|
"scripts"
|
||||||
],
|
],
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"strictMetadataEmit": true,
|
"strictMetadataEmit": true,
|
||||||
"skipTemplateCodegen": true,
|
"skipTemplateCodegen": true,
|
||||||
"annotationsAs": "decorators"
|
"annotationsAs": "decorators"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user