Skip to content

As a CLI user, I want the doc command to guide me to the version of Angular I'm using #12365

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

Closed
hansl opened this issue Sep 25, 2018 · 5 comments · Fixed by #14926
Closed

As a CLI user, I want the doc command to guide me to the version of Angular I'm using #12365

hansl opened this issue Sep 25, 2018 · 5 comments · Fixed by #14926
Labels
area: @angular/cli feature Issue that requests a new feature
Milestone

Comments

@hansl
Copy link
Contributor

hansl commented Sep 25, 2018

Right now the ng doc command uses the latest version of the doc. It would be nice to (acceptance criteria):

  1. provide a flag to specify which version to use, and
  2. by default, use the version of angular core that's installed in the project.

This way people can use the doc command with the version of angular.io they care about.

@clydin clydin added feature Issue that requests a new feature area: @angular/cli labels Sep 26, 2018
@ngbot ngbot bot added this to the Backlog milestone Sep 26, 2018
LakhyariMs added a commit to LakhyariMs/angular-cli that referenced this issue Jun 15, 2019
With this commit , we can now specify a `version`

for the `ng doc` command

    ng doc --version 6

    ng doc -v 6

and this will open `v6.angular.io` instead of `angular.io`

The default domain is still used

if no version is specified

Refs angular#12365
LakhyariMs added a commit to LakhyariMs/angular-cli that referenced this issue Jun 15, 2019
With this commit, we can now specify a `version`

for the `ng doc` command

    ng doc --version 6

    ng doc -v 6

and this will open `v6.angular.io` instead of `angular.io`.

The default domain is still used

if no version is specified.

Refs angular#12365
LakhyariMs added a commit to LakhyariMs/angular-cli that referenced this issue Jun 15, 2019
With this commit, we can now specify a `version`
for the `ng doc` command

    ng doc --version 6
    ng doc -v 6

and this will open `v6.angular.io` instead of `angular.io`.
The default domain is still used
if no version is specified.

Refs angular#12365
LakhyariMs added a commit to LakhyariMs/angular-cli that referenced this issue Jun 16, 2019
With this commit I added the changes suggested.
Refs angular#12365
clydin pushed a commit to clydin/angular-cli that referenced this issue Jun 17, 2019
With this commit, we can now specify a `version`
for the `ng doc` command

    ng doc --version 6
    ng doc -v 6

and this will open `v6.angular.io` instead of `angular.io`.
The default domain is still used
if no version is specified.

Refs angular#12365
clydin pushed a commit to LakhyariMs/angular-cli that referenced this issue Jun 17, 2019
With this commit, we can now specify a `version`
for the `ng doc` command

    ng doc --version 6
    ng doc -v 6

and this will open `v6.angular.io` instead of `angular.io`.
The default domain is still used
if no version is specified.

Refs angular#12365
clydin pushed a commit to LakhyariMs/angular-cli that referenced this issue Jun 17, 2019
With this commit, we can now specify a `version`
for the `ng doc` command

    ng doc --version 6
    ng doc -v 6

and this will open `v6.angular.io` instead of `angular.io`.
The default domain is still used
if no version is specified.

Refs angular#12365
mgechev pushed a commit that referenced this issue Jun 17, 2019
With this commit, we can now specify a `version`
for the `ng doc` command

    ng doc --version 6
    ng doc -v 6

and this will open `v6.angular.io` instead of `angular.io`.
The default domain is still used
if no version is specified.

Refs #12365
@cexbrayat
Copy link
Member

This issue was partially fixed by #14788 as it's now possible to use:

ng doc --version 6 // opens v6.angular.io
ng doc --version next // opens next.angular.io

The second part of the issue requires to read the Angular version installed in the project.
@alan-agius4 @clydin What would you recommend to use to grab the Angular version in the doc command?

@mgechev
Copy link
Member

mgechev commented Jun 18, 2019

require('@angular/core').VERSION seems the most accurate way to me.

@clydin
Copy link
Member

clydin commented Jun 18, 2019

I agree. Wrap that in a try catch and use a split on the periods to extract the major version. Use the default domain if an exception occurs.

@cexbrayat
Copy link
Member

Thanks for the feedback!

@LakhyariMs Would you like to give it a try and open a new PR with this? Or do you prefer that someone else does it?

cexbrayat added a commit to cexbrayat/angular-cli that referenced this issue Jun 27, 2019
Follow-up to angular#14788 that allowed `ng doc --version 6`.
This commit enhances the doc command to use the current Angular version of the project by default, if no version is provided explicitely.

Fixes angular#12365
cexbrayat added a commit to cexbrayat/angular-cli that referenced this issue Jun 27, 2019
Follow-up to angular#14788 that allowed `ng doc --version 6`.
This commit enhances the doc command to use the current Angular version of the project by default, if no version is provided explicitely.

Fixes angular#12365
vikerman pushed a commit that referenced this issue Jun 27, 2019
Follow-up to #14788 that allowed `ng doc --version 6`.
This commit enhances the doc command to use the current Angular version of the project by default, if no version is provided explicitely.

Fixes #12365
@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 Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants