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

[DOCS] How to get information about a child package during a lifecycle install script? #2954

Closed
jamesla opened this issue Mar 25, 2021 · 1 comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@jamesla
Copy link

jamesla commented Mar 25, 2021

I have read through the following document but it is missing a specific condition: https://docs.npmjs.com/cli/v7/using-npm/scripts#environment

I am creating an NPM package and when somebody installs my package I want the install lifecycle script to run - which it does.

However the my package needs to know a few things about the downstream package that is installing it IE it's name and what directory it's in.

The documents explain how to get information about my own package via it's package.json file but not how to get information about the package that is installing it.

Is this possible and how would I do this using an NPM lifecycle script?

@jamesla jamesla added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Mar 25, 2021
@darcyclarke darcyclarke removed the Needs Triage needs review for next steps label May 14, 2021
@darcyclarke
Copy link
Contributor

This isn't something we really encourage want people doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants