Files
bower/lib/core/config.js
André Cruz 71cddb628e Several fixes.
- Fix issue with download() emiting two 'resolve' events.
- Do not fallback to package.json and to tag describe if there was an error parsing the json file
- Move out cache dir to the config.js file
- Tweak, fix and add test to the point 2.
2012-10-15 17:03:08 +01:00

11 lines
505 B
JavaScript

var path = require('path');
var temp = process.env.TMPDIR || process.env.TMP || process.env.TEMP || process.platform === 'win32' ? 'c:\\windows\\temp' : '/tmp';
var home = (process.platform === 'win32' ? process.env.USERPROFILE : process.env.HOME) || temp;
var cache = process.platform === 'win32' ? path.resolve(process.env.APPDATA || home || temp, 'bower-cache') : path.resolve(home || temp, '.bower');
module.exports = {
directory: 'components',
json: 'component.json',
cache: cache
};