Skip to content

Commit

Permalink
fix: a couple nits in document; added publishConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Coe committed Sep 30, 2016
1 parent 35757e4 commit 2fc8ffd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Example of using Travis CI to automatically publish your packages to npm, using:

To be able to install private packages and to publish on your behalf, Travis CI
needs your npm deploy token. After logging into npm, [this token can be found
in your `.npmrc` file](https://npme.npmjs.com/docs/workflow/travis.html#option-1-fetch-your-npm-enterprise-secret-token).
in your `~/.npmrc` file](https://npme.npmjs.com/docs/workflow/travis.html#option-1-fetch-your-npm-enterprise-secret-token).

Once you fetch your token, set this as an environment variable in Travis CI called `NPM_TOKEN`:

Expand All @@ -31,7 +31,7 @@ before_install:
This allows us to install the private `@bcoe/super-secret-dependency` dependency.

## Automatically Publishing From Travis CI
## Configuration Travis CI for Deployment

The `.travis.yml` included in this repository automatically publishes to npm, if
tests pass for any [git tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging) that you push to GitHub. Here
Expand Down Expand Up @@ -93,12 +93,12 @@ That's all there is to it, it's _literally_ magic.
## Using npm Enterprise

To configure Travis CI's deploys to use your private [npm Enterprise](https://www.npmjs.com/enterprise)
server, only two configuration changes need to be made:
server only two configuration changes need to be made:

1. add a `publishConfig.registry` to your `package.json` that references your
private registry:

```
```json
{
"publishConfig": {
"registry": "https://npmo-demo-registry.npmjs.com"
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
},
"files": [
"index.js"
]
],
"publishConfig": {
"registry": "https://npmo-demo-registry.npmjs.com"
}
}

0 comments on commit 2fc8ffd

Please sign in to comment.