22

When I run yarn init one of the questions is question private. I searched everywhere but couldn't find an explaination for that. What does it mean private in this context?

1 Answer 1

28

yarn init is meant to assist you in the process of creating a package.json for a new project.

private means adding a private: true field in the autogenerated package.json, which will instruct npm to refuse publishing the package to the public NPM registry on npm publish.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.