core/postinstall.js
function writeLocationFile(location) {
  log.info('Writing location.js file');
  if (process.platform === 'win32') {
    location = location.replace(/\\/g, '\\\\');
  }
  fs.writeFileSync(path.join(libPath, 'location.js'),
    'module.exports.location = \'' + location + '\';');
}
function writeLocationFile(location) {
  log.info('Writing location.js file');
  if (process.platform === 'win32') {
    location = location.replace(/\\/g, '\\\\');
  }
  fs.writeFileSync(path.join(libPath, 'location.js'),
    'module.exports.location = \'' + location + '\';');
}
function writeLocationFile ( location ) { log . info ( 'Writing location.js file' ) ; if ( process . platform === 'win32' ) { location = location . replace ( / \\ / g , '\\\\' ) ; } fs . writeFileSync ( path . join ( libPath , 'location.js' ) , 'module.exports.location = \'' + location + '\';' ) ; }
Save the destination directory back
@param {string} location - path of the directory
Save the destination directory back