Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

rename "github_token" to "github-token" #18

Merged
merged 2 commits into from

2 participants

@rlidwka

According to npm coding style, config keys are separated by dashes, not underscores.

The point is: if this feature will ever make it into upstream, config key will be named according to that standard. If that happens, I wouldn't want people to change their configs everywhere...

PS: also added some docs, I know nobody cares, but test/tap/config-meta.js fails :P

@tj tj merged commit bbcb826 into tj:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 31, 2014
  1. @rlidwka

    document github_token

    rlidwka authored
  2. @rlidwka
This page is out of date. Refresh to see the latest.
View
4 README.md
@@ -51,9 +51,9 @@ For authentiation you need to create an access token:
Then run:
```
-$ npm config set github_token <token>
+$ npm config set github-token <token>
```
# License
- Whatever npm is + MIT
+ Whatever npm is + MIT
View
8 doc/misc/npm-config.md
@@ -317,6 +317,14 @@ the git binary.
Tag the commit when using the `npm version` command.
+### github-token
+
+* Default: null
+* Type: String
+
+Github auth token, in case you're using private github repositories. You
+can create one [here](https://github.com/settings/applications).
+
### global
* Default: false
View
2  lib/cache.js
@@ -229,7 +229,7 @@ function _add(args, cb) {
var val = spec.split('@')[1];
if (~key.indexOf('/')) {
- var token = npm.config.get('github_token');
+ var token = npm.config.get('github-token');
lookup({
token: token,
View
2  node_modules/npmconf/config-defs.js
@@ -146,6 +146,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
, git: "git"
, "git-tag-version": true
+ , "github-token": null
, global : false
, globalconfig : path.resolve(globalPrefix, "etc", "npmrc")
@@ -241,6 +242,7 @@ exports.types =
, "fetch-retry-maxtimeout": Number
, git: String
, "git-tag-version": Boolean
+ , "github-token" : [null, String]
, global : Boolean
, globalconfig : path
, group : [Number, String]
Something went wrong with that request. Please try again.