Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

csandven/Get-Git-Module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

17 Commits

Repository files navigation

Get Git Module

Get single scripts or folder of scripts from github to reuse in your project.

Installation

npm install -g getgitmodule

Usage

Note: This script should always be called from the root directory of your project.

Setup target folder (Optional)

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

Get a file or folder from a public repository

$ 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')

Get a file or folder from a private repository

$ 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) myModule

File can now be used like:

const myModule = require('./git_modules/myModule')

With arguments

getgitmodule import --repo myCompany/myRepo --branch master --file myFolder/myFile.js

Removing

Remove one module

$ getgitmodule remove myModule
Successfully removed myModule

Remove many modules

$ getgitmodule remove myModule mySecondModule myThirdModule
Successfully removed myModule
Successfully removed mySecondModule
Successfully removed myThirdModule

Remove credentials

$ getgitmodule credentials remove
Credentials was removed!

Installing | Updating

To update or install modules from git_modules.json:

getgitmodule install

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /