Get single scripts or folder of scripts from github to reuse in your project.
npm install -g getgitmoduleNote: This script should always be called from the root directory of your project.
The default target folder for the modules is: ./path/to/your/project/git_modules. This can be changed to what ever you like.
getgitmodule import setPath ./yourModuleFolder$ getgitmodule import
Get from repo: babel/babel
Repo branch: (master)
Specific file: (optional) scripts/utils/writeFileAndMkDir.js
Alias for module: (babel) writeFile
Module was added!File can now be used like:
const writeFile = require('./git_modules/writeFile')
writeFile('/myFile', 'myFileContent')$ getgitmodule credentials set
Github Username: myGithubUsername
Github Password:
New credentials stored!
$ getgitmodule import
Get from repo: myCompany/myRepo
Repo branch: (master)
Specific file: (optional) myFolder/myFile.js
Alias for module: (babel) myModuleFile can now be used like:
const myModule = require('./git_modules/myModule')getgitmodule import --repo myCompany/myRepo --branch master --file myFolder/myFile.jsRemove one module
$ getgitmodule remove myModule
Successfully removed myModuleRemove many modules
$ getgitmodule remove myModule mySecondModule myThirdModule
Successfully removed myModule
Successfully removed mySecondModule
Successfully removed myThirdModuleRemove credentials
$ getgitmodule credentials remove
Credentials was removed!To update or install modules from git_modules.json:
getgitmodule install