download-and-install
v3.0.1
Published
Download a Github repo, copy an array of files to a folder in the cwd and install the dependencies of the package.json from the repository
Downloads
2
Readme
download-and-install
Este módulo descarga un repositorio de Github. El repositorio puede tener un package.json cuyas dependencias se desean instalar, sin sobreescribir alguna dependencia que tenga una versión diferente de aquella con la que cuenta el package.json del proyecto.
Uso
npm i download-and-install -S
const downloadAndInstall = require('download-and-install')
// First arguement: the git repo,
// Second argument: an array of pairs, the first is glob that specifies the path inside the repo, the second a path to where the file or files are going to be copied
// Third argument: an array of package.json dependencies that we wish to install (pass [], to install all, and [''] to not install any of them)
// Fourth is a callback function
// All arguments are required
let all_options = {
as_dev_dependencies: false,// default
from_dev_dependencies: false// default
}
downloadAndInstall('diegovdc/coral-mongo-tasks', [['specs/**', 'specs']], ['data.task'],all_options () => console.log('all done'))