How to use the simple-git.clone function in simple-git

To help you get started, we’ve selected a few simple-git examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alt-code / TaskLights / src / blink.js View on Github external
if( options.remote == undefined )
        options.remote = obj.remote
}

var directory = path.join(__dirname,"/logs");
var gitDirectory = path.join(directory, ".git");
var dataFile = path.join(directory, "pomodoro.json");
var gh_pages = path.join(directory, "www")

// Save message to repo.
if( options.remote )
{
    // starting a new repo
    if( !fs.existsSync( gitDirectory ) )
    {
        require('simple-git')()
            .clone(options.remote,directory, function (err) 
            {
                // done.
              commitLogMessage();
           });
    }
    else
    {
        // update repo and when there are changes, pull changes
        require('simple-git')(directory)
           .pull(function(err, update) 
           {
              if(update && update.summary.changes) 
              {
                console.log( "pulled latest")
              }
github alt-code / TaskLights / src / blink2.js View on Github external
if( options.remote == undefined )
        options.remote = obj.remote
}

var directory = path.join(__dirname,"/logs");
var gitDirectory = path.join(directory, ".git");
var dataFile = path.join(directory, "pomodoro.json");
var gh_pages = path.join(directory, "www")

// Save message to repo.
if( options.remote )
{
    // starting a new repo
    if( !fs.existsSync( gitDirectory ) )
    {
        require('simple-git')()
            .clone(options.remote,directory, function (err) 
            {
                // done.
              commitLogMessage();
           });
    }
    else
    {
        // update repo and when there are changes, pull changes
        require('simple-git')(directory)
           .pull(function(err, update) 
           {
              if(update && update.summary.changes) 
              {
                console.log( "pulled latest")
              }
github Jasonette / JEM / src / process / process.js View on Github external
export var CloneAndAddToIDE = function (path, gitUrl){
    var pieces = gitUrl.replace(".git","").split("/");
    var extensionName = pieces[pieces.length-1];
    var fullPath = path + "/Extensions/" + extensionName;
    console.log("Git Url : " + gitUrl);
    console.log("Full path : " + fullPath);
    require('simple-git')()
        .clone(gitUrl, fullPath, function(err){
          if(err){
            ShowLoading("Extesnion doesn't exists.", true);
            ShowErrorDialog("Error", "Repository doesn't exists");
          }
        })
        .then(function() {
            ShowLoading('Verifying extension...');
            var AllFiles = GetAllFilesFromPath(fullPath);
            var extName = GetActionName(AllFiles);
            AddFileInXcode(AllFiles,path,extName);
            var dep = GetDependencies(AllFiles);
            if(dep != null && dep.length > 0){
              InjectCocoapodsDependencies(path, dep);
          }else {
            ShowLoading('Completed...', true);
github Jasonette / JEM / app / main.js View on Github external
var CloneAndAddToAndroid = function (path, gitUrl){
    var pieces = gitUrl.replace(".git","").split("/");
    var extensionName = pieces[pieces.length-1];
    var fullPath = path + "/Extensions/" + extensionName;
    console.log("Git Url : " + gitUrl);
    console.log("Full path : " + fullPath);
    require('simple-git')()
        .clone(gitUrl, fullPath, function(err){
          if(err){
            ShowLoading("Extesnion doesn't exists.", true);
            ShowErrorDialog("Error", "Repository doesn't exists");
          }
        })
        .then(function() {
          ShowLoading('Verifying extension...');
          var validFiles = ["java","json"];
          var allFiles = GetSpecificFilesFromPath(fullPath, validFiles);
          var extName = GetActionName(allFiles);
          AddFilesInAndroidStudio(allFiles,fullPath,extName,path);
          var dep = GetDependencies$1(allFiles);
          if(dep != null && dep.length > 0){
            InjectGradleDependencies(path, dep);
          }else {
github Jasonette / JEM / src / android_process / android_process.js View on Github external
export var CloneAndAddToAndroid = function (path, gitUrl){
    var pieces = gitUrl.replace(".git","").split("/");
    var extensionName = pieces[pieces.length-1];
    var fullPath = path + "/Extensions/" + extensionName;
    console.log("Git Url : " + gitUrl);
    console.log("Full path : " + fullPath);
    require('simple-git')()
        .clone(gitUrl, fullPath, function(err){
          if(err){
            ShowLoading("Extesnion doesn't exists.", true);
            ShowErrorDialog("Error", "Repository doesn't exists");
          }
        })
        .then(function() {
          ShowLoading('Verifying extension...');
          var validFiles = ["java","json"];
          var allFiles = GetSpecificFilesFromPath(fullPath, validFiles);
          var extName = GetActionName(allFiles);
          AddFilesInAndroidStudio(allFiles,fullPath,extName,path);
          var dep = GetDependencies(allFiles);
          if(dep != null && dep.length > 0){
            InjectGradleDependencies(path, dep);
          }else {