From aa32239aed86fc5c65f02823d7bb5cb52f647bfb Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Tue, 29 Jan 2019 23:52:59 +0000 Subject: 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(+) (limited to 'doc') diff --git a/doc/files/package.json.md b/doc/files/package.json.md index dd6492af0..95e77d34c 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 -- cgit v1.2.3