thali/install/install.js
function copyDevelopmentThaliCordovaPluginToProject(appRootDirectory,
                                                    thaliDontCheckIn,
                                                    depotName,
                                                    branchName) {
  var targetDirectory = createUnzippedDirectoryPath(depotName, branchName,
                                                    thaliDontCheckIn);
  var sourceDirectory = path.join(
    appRootDirectory, '..', 'Thali_CordovaPlugin');

  return new Promise(function (resolve, reject) {
    fs.remove(targetDirectory, function (err) {
      if (err) {
        reject(new Error('copyDevelopmentThaliCordovaPluginToProject remove ' +
                         'failed with ' + err));
        return;
      }
      console.log('Copying files from ' + sourceDirectory + ' to ' +
                  targetDirectory);
      fs.copy(sourceDirectory, targetDirectory, function (err) {
        if (err) {
          reject(
            new Error('copyDevelopmentThaliCordovaPluginToProject failed with' +
                      err));
          return;
        }
        resolve(createGitHubZipResponse(depotName, branchName, thaliDontCheckIn,
                                        true));
      });
    });
  });
}
function copyDevelopmentThaliCordovaPluginToProject(appRootDirectory,
                                                    thaliDontCheckIn,
                                                    depotName,
                                                    branchName) {
  var targetDirectory = createUnzippedDirectoryPath(depotName, branchName,
                                                    thaliDontCheckIn);
  var sourceDirectory = path.join(
    appRootDirectory, '..', 'Thali_CordovaPlugin');

  return new Promise(function (resolve, reject) {
    fs.remove(targetDirectory, function (err) {
      if (err) {
        reject(new Error('copyDevelopmentThaliCordovaPluginToProject remove ' +
                         'failed with ' + err));
        return;
      }
      console.log('Copying files from ' + sourceDirectory + ' to ' +
                  targetDirectory);
      fs.copy(sourceDirectory, targetDirectory, function (err) {
        if (err) {
          reject(
            new Error('copyDevelopmentThaliCordovaPluginToProject failed with' +
                      err));
          return;
        }
        resolve(createGitHubZipResponse(depotName, branchName, thaliDontCheckIn,
                                        true));
      });
    });
  });
}
function copyDevelopmentThaliCordovaPluginToProject ( appRootDirectory , thaliDontCheckIn , depotName , branchName ) { var targetDirectory = createUnzippedDirectoryPath ( depotName , branchName , thaliDontCheckIn ) ; var sourceDirectory = path . join ( appRootDirectory , '..' , 'Thali_CordovaPlugin' ) ; return new Promise ( function ( resolve , reject ) { fs . remove ( targetDirectory , function ( err ) { if ( err ) { reject ( new Error ( 'copyDevelopmentThaliCordovaPluginToProject remove ' + 'failed with ' + err ) ) ; return ; } console . log ( 'Copying files from ' + sourceDirectory + ' to ' + targetDirectory ) ; fs . copy ( sourceDirectory , targetDirectory , function ( err ) { if ( err ) { reject ( new Error ( 'copyDevelopmentThaliCordovaPluginToProject failed with' + err ) ) ; return ; } resolve ( createGitHubZipResponse ( depotName , branchName , thaliDontCheckIn , true ) ) ; } ) ; } ) ; } ) ; }
This will copy the contents of a Thali_CordovaPlugin local depot to the right
directory in the current Cordova project so it will be installed. This is
used for local development only.

@param {string} appRootDirectory
@param {string} thaliDontCheckIn
@param {string} depotName
@param {string} branchName
@returns {Promise<Object|Error>}
This will copy the contents of a Thali_CordovaPlugin local depot to the right directory in the current Cordova project so it will be installed . This is used for local development only .