X Tutup
The Wayback Machine - https://web.archive.org/web/20260216071347/https://github.com/angular/angular-cli/pull/15781
Skip to content

docs add npm link information for @angular-devkit/schematics and @ang…#15781

Closed
djencks wants to merge 1 commit intoangular:masterfrom
djencks:build-instructions
Closed

docs add npm link information for @angular-devkit/schematics and @ang…#15781
djencks wants to merge 1 commit intoangular:masterfrom
djencks:build-instructions

Conversation

@djencks
Copy link

@djencks djencks commented Oct 8, 2019

…ular-devkit/schematics-cli

The @angular-cli/README.md appears to be the build/link documentation
also for @angular-devkit/schematics and
@angular-devkit/schematics-cli, but following the instructions does
not result in usable local schematics. Add sufficient commands so
these projects can be used as local packages and the schematics
command works.

Fixes #15779

@clydin
Copy link
Member

clydin commented Oct 24, 2019

Can you update the commit message to include a colon after docs?

@djencks djencks force-pushed the build-instructions branch from 57ce08b to 383aa28 Compare October 24, 2019 16:22
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Oct 31, 2019
npm run build
cd dist/@angular/cli
npm link
(cd dist/@angular/cli;npm link)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about this a bit more the npm links should be something like

npm link dist/@angular/cli
npm link dist/@angular-devkit/schematics

Also, if you are using @angular/cli you don't need to use @angular-devkit/schematics-cli

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

@alan-agius4 alan-agius4 removed the target: patch This PR is targeted for the next patch release label Oct 31, 2019
…gular-devkit/schematics-cli

The @angular-cli/README.md appears to be the build/link documentation
also for @angular-devkit/schematics and
@angular-devkit/schematics-cli, but following the instructions does
not result in usable local schematics. Add sufficient commands so
these projects can be used as local packages and the schematics
command works.
@djencks djencks force-pushed the build-instructions branch from 383aa28 to 509b6d5 Compare November 1, 2019 18:49
@djencks
Copy link
Author

djencks commented Nov 1, 2019

I updated the npm link commands, and think I found a way to use npm link to get schematics-cli to use the local schematics build. I'm not developing schematics for angular but using schematics to assemble scaffolding for another project, and per the existing documentation I was using schematics-cli during development. As my local work has moved beyond this stage I don't any longer have a setup to actually test that these commands work but the results of running them look reasonable.

@djencks
Copy link
Author

djencks commented Nov 5, 2019

I can't tell from the GitHub interface if I'm expected to do anything else at this point.

@clydin clydin added the target: major This PR is targeted for the next major release label Nov 6, 2019
@clydin clydin requested a review from alan-agius4 November 11, 2019 20:30
# these need to be run after each npm run build
# in addition, npm link of schematics-cli installs the published copy of @angular-devkit/schematics into node_modules
# To induce the schematics command to use the locally compiled version of @angular-devkit/schematics:
(cd dist/@angular-devkit/schematics-cli; npm link @angular-devkit/schematics)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use && instead of ; as the later will not work on Windows.

@alan-agius4
Copy link
Collaborator

Closing as this PR is stale. Feel free to open a new PR. Thanks.

@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 Apr 17, 2021
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

Development

Successfully merging this pull request may close these issues.

Developer documentation for @angular-devkit/schematics is misleading and incomplete

4 participants

X Tutup