localPath -> localPlace

This commit is contained in:
igorklopov 2016-08-10 14:13:59 +03:00
parent 166171f304
commit 1a74716c25
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import chipo from 'child-process-promise';
import copyFile from './copy-file.js';
import { localPath } from './places.js';
import { localPlace } from './places.js';
import mkdirp from 'mkdirp-promise';
import patchesJson from '../patches/patches.json';
import path from 'path';
@ -60,7 +60,7 @@ export default async function build (nodeVersion, target) {
output = await compileOnUnix(target);
}
const dest = localPath({ version,
const dest = localPlace({ version,
nodeVersion, platform, arch: target });
await mkdirp(path.dirname(dest));
await copyFile(output, dest);

View File

@ -5,11 +5,11 @@ const expand = expandTemplate();
const binaries = {
moduleName: 'pkg-base-binary',
localPath: '~/.pkg-cache/{version}/{nodeVersion}-{platform}-{arch}/'
localPlace: '~/.pkg-cache/{version}/{nodeVersion}-{platform}-{arch}/'
};
export function localPath (opts) {
const p = binaries.localPath;
export function localPlace (opts) {
const p = binaries.localPlace;
const atHome = p.replace('~', os.homedir());
return expand(path.resolve(atHome), opts);
}