-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
36 lines (31 loc) · 936 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**!
* cnpm - config.js
*
* Copyright(c) cnpmjs.org and other contributors.
* MIT Licensed
*
* Authors:
* fengmk2 <[email protected]> (http://fengmk2.github.com)
*/
'use strict';
/**
* Module dependencies.
*/
var path = require('path');
var fs = require('fs');
var program = require('commander');
var root;
if (process.platform === 'win32') {
root = process.env.USERPROFILE || process.env.APPDATA || process.env.TMP || process.env.TEMP;
} else {
root = process.env.HOME || process.env.TMPDIR || '/tmp';
}
var config = module.exports = {
cnpmHost: 'https://npm.taobao.org',
cnpmRegistry: 'https://registry.npm.taobao.org',
disturl: 'https://npm.taobao.org/mirrors/node', // download dist tarball for node-gyp
iojsDisturl: 'https://npm.taobao.org/mirrors/iojs',
mirrorsUrl: 'https://npm.taobao.org/mirrors',
cache: path.join(root, '.cnpm'), //cache folder name
userconfig: path.join(root, '.cnpmrc')
};