Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(@angular/cli): add support for ng-add packages that should not b… #15815

Merged
merged 2 commits into from
Oct 14, 2019
Merged

feat(@angular/cli): add support for ng-add packages that should not b… #15815

merged 2 commits into from
Oct 14, 2019

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Oct 11, 2019

feat(@angular/cli): add support for ng-add packages that should not be saved as dependencies

With this change the CLI offers a way for a package authors to specify if during ng add the package should be saved as a dependencies, devDependencies or not saved at all.

Such config needs to be specified in package.json

Example:

  "ng-add": {
    "save": false
  }

Possible values are;

  • false - Don't add the package to package.json
  • true - Add the package to the dependencies
  • dependencies - Add the package to the dependencies
  • devDependencies - Add the package to the devDependencies

Closes #12003 , closes #15764 and closes #13237

@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Oct 11, 2019
…e saved as `dependencies`

With this change the CLI offers a way for a package authors to specify if during `ng add` the package should be saved as a `dependencies`, `devDependencies` or not saved at all.

Such config needs to be specified in `package.json`

Example:
```json
  "ng-add": {
    "save": false
  }
```

Possible values are;
- false - Don't add the package to `package.json`
- true - Add the package to the `dependencies`
- `dependencies` - Add the package to the `dependencies`
- `devDependencies` - Add the package to the `devDependencies`

Closes #12003 , closes #15764 and closes #13237
`@angular/pwa` is not needed as a dependency. This is because the pwa package is a schematic and is only used once when adding pwa capabilities to your application. After that, this package is not used anymore.

Closes #15764
@vikerman vikerman merged commit a7f977f into angular:master Oct 14, 2019
@alan-agius4 alan-agius4 deleted the ng-add-deps branch October 15, 2019 00:49
alan-agius4 added a commit to alan-agius4/ngx-deploy-npm that referenced this pull request Nov 6, 2019
In the latest versions of the CLI `ng-add` packages can be added to `devDependencies` and this package is perfect for such use case since it's only needed for development.

See: angular/angular-cli#15815
alan-agius4 added a commit to alan-agius4/ng-deploy-azure that referenced this pull request Nov 6, 2019
In the latest versions of the CLI `ng-add` packages can be added to `devDependencies` and this package is perfect for such use case since it's only needed for development.

See: angular/angular-cli#15815
alan-agius4 added a commit to alan-agius4/ng-deploy-now that referenced this pull request Nov 6, 2019
In the latest versions of the CLI `ng-add` packages can be added to `devDependencies` and this package is perfect for such use case since it's only needed for development.

See: angular/angular-cli#15815
alan-agius4 added a commit to alan-agius4/angular-cli-ghpages that referenced this pull request Nov 6, 2019
In the latest versions of the CLI `ng-add` packages can be added to `devDependencies` and this package is perfect for such use case since it's only needed for development.

See: angular/angular-cli#15815
alan-agius4 added a commit to alan-agius4/netlify-builder that referenced this pull request Nov 6, 2019
In the latest versions of the CLI `ng-add` packages can be added to `devDependencies` and this package is perfect for such use case since it's only needed for development.

See: angular/angular-cli#15815
JohannesHoppe pushed a commit to angular-schule/angular-cli-ghpages that referenced this pull request Nov 6, 2019
In the latest versions of the CLI `ng-add` packages can be added to `devDependencies` and this package is perfect for such use case since it's only needed for development.

See: angular/angular-cli#15815
JohannesHoppe pushed a commit to angular-schule/ngx-deploy-starter that referenced this pull request Nov 6, 2019
In the latest versions of the CLI `ng-add` packages can be added to `devDependencies` and this package is perfect for such use case since it's only needed for development.

See: angular/angular-cli#15815
(cherry picked from commit 3dfd8d6)

closes #12
see angular-schule/angular-cli-ghpages#81
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: major This PR is targeted for the next major release
Projects
None yet
4 participants