docs: be clear about what module of semantic-release handles updating the package.json (#1601)
This commit is contained in:
		
							parent
							
								
									b5c9dea215
								
							
						
					
					
						commit
						6d118c6c14
					
				| @ -2,12 +2,14 @@ | |||||||
| 
 | 
 | ||||||
| ## Why is the `package.json`’s version not updated in my repository? | ## Why is the `package.json`’s version not updated in my repository? | ||||||
| 
 | 
 | ||||||
| **semantic-release** takes care of updating the `package.json`’s version before publishing to [npm](https://www.npmjs.com). | [`@semantic-release/npm`](https://github.com/semantic-release/npm) takes care of updating the `package.json`’s version before publishing to [npm](https://www.npmjs.com). | ||||||
| 
 | 
 | ||||||
| By default, only the published package will contain the version, which is the only place where it is *really* required, but the updated `package.json` will not be pushed to the Git repository | By default, only the published package will contain the version, which is the only place where it is *really* required, but the updated `package.json` will not be pushed to the Git repository | ||||||
| 
 | 
 | ||||||
| However, the [`@semantic-release/git`](https://github.com/semantic-release/git) plugin can be used to push the updated `package.json` as well as other files to the Git repository. | However, the [`@semantic-release/git`](https://github.com/semantic-release/git) plugin can be used to push the updated `package.json` as well as other files to the Git repository. | ||||||
| 
 | 
 | ||||||
|  | If you wish to only update the `package.json` and push via Git you can set the project to `"private": true,` within your `package.json` to prevent publishing to [npm](https://www.npmjs.com). This can be useful for using **semantic-release** with a non-node project. | ||||||
|  | 
 | ||||||
| ## How can I use a npm build script that requires the `package.json`’s version ? | ## How can I use a npm build script that requires the `package.json`’s version ? | ||||||
| 
 | 
 | ||||||
| The `package.json`’s version will be updated by the `semantic-release` command just before publishing to [npm](https://www.npmjs.com), therefore it won't be available for scripts ran before the `semantic-release` command. | The `package.json`’s version will be updated by the `semantic-release` command just before publishing to [npm](https://www.npmjs.com), therefore it won't be available for scripts ran before the `semantic-release` command. | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user