From 3663cdef205fa9ba2c2830e5ef7ceeb31c30298c Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Tue, 29 Jan 2019 23:52:59 +0000 Subject: [PATCH] doc: update package.json docs to include repository.directory details (#140) PR-URL: https://github.com/npm/cli/pull/140 Credit: @greysteil Reviewed-By: @aeschright --- doc/files/package.json.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/files/package.json.md b/doc/files/package.json.md index dd6492af08430..95e77d34c5f9f 100644 --- a/doc/files/package.json.md +++ b/doc/files/package.json.md @@ -393,6 +393,15 @@ shortcut syntax you use for `npm install`: "repository": "gitlab:user/repo" +If the `package.json` for your package is not in the root directory (for example +if it is part of a monorepo), you can specify the directory in which it lives: + + "repository": { + "type" : "git", + "url" : "https://github.com/facebook/react.git", + "directory": "packages/react-dom" + } + ## scripts The "scripts" property is a dictionary containing script commands that are run