How to use git-clone - 5 common examples

To help you get started, we’ve selected a few git-clone 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 mikelambert / dancedeets-monorepo / mobile / scripts / compileLanguages.js View on Github external
function downloadCountryList(cb) {
  mkdirpSync('build');
  clone(
    'https://github.com/umpirsky/country-list.git',
    REPO_PATH,
    { shallow: true },
    cb
  );
}
github mikelambert / dancedeets-monorepo / scripts / compileLanguagesCore.js View on Github external
function downloadCountryList(cb) {
  mkdirpSync('build');
  clone('https://github.com/umpirsky/country-list.git', REPO_PATH, {shallow: true}, cb);
}
github ant-ife / apfe-cli / src / lib / util.js View on Github external
return new Promise((resolve, reject) => {
    clone(git, tmp, { clone: clone }, function (err) {
      spinner.stop()
      if (err) {
        error('Failed to download repo ' + git + ': ' + err.message.trim())
        reject(err)
      }
      resolve(tmp)
    })
  })
}
github rocjs / roc / src / commands / init / fetchTemplate.js View on Github external
return new Promise((resolve) => {
        try {
            gitClone(template, tmp, { checkout: version }, (error) => {
                if (error) {
                    spinner.fail();
                    log.error(
                        `Failed to download the template from ${chalk.bold(template)} using ${chalk.bold(version)}`,
                        error
                    );
                }

                spinner.succeed();

                removeSync(path.join(tmp, '.git'));
                resolve(tmp);
            });
        } catch (error) {
            log.error('An error happened when downloading the template.', error);
        }
github forrestjs / forrestjs / packages / cli / src / lib / cmd-new.js View on Github external
await new Promise((resolve, reject) => {
        gitClone(repoUrl, projectCwd, (err) => {
            if (err) {
                const error = new Error(`Failed to clone "${repoUrl}" - ${err.message}`)
                error.originalError = err
                reject(error)
            } else {
                resolve()
            }
        })
    })

git-clone

Clone a git repository

ISC
Latest version published 3 years ago

Package Health Score

35 / 100
Full package analysis

Popular git-clone functions