# @xblox/git-module

> Package which emulates git sub modules

Latest version **0.0.14** (published 2017-12-28) · 0 weekly downloads

## Install

```sh
npm install @xblox/git-module
pnpm add @xblox/git-module
yarn add @xblox/git-module
bun add @xblox/git-module
```

Provides the command `git-module`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.14 |
| Published | 2017-12-28 |
| First published | 2017-12-28 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | xblox |

## Links

- npm: https://www.npmjs.com/package/@xblox/git-module
- Repository: https://github.com/xblox/git-module
- Homepage: https://github.com/xblox/git-module#readme
- Issues: https://github.com/xblox/git-module/issues
- npm.io page: https://npm.io/package/@xblox/git-module

## Dependencies (13)

- [q](https://npm.io/package/q.md) ^1.4.1
- [ora](https://npm.io/package/ora.md) ^1.3.0
- [jsome](https://npm.io/package/jsome.md) ^2.3.26
- [tslib](https://npm.io/package/tslib.md) ^1.8.1
- [yargs](https://npm.io/package/yargs.md) ^6.6.0
- [globby](https://npm.io/package/globby.md) ^6.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.16.6
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [pkg-dir](https://npm.io/package/pkg-dir.md) ^2.0.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.1
- [@xblox/fs](https://npm.io/package/@xblox/fs.md) ^0.13.18
- [yargonaut](https://npm.io/package/yargonaut.md) ^1.1.2
- [class-transformer](https://npm.io/package/class-transformer.md) ^0.1.8

## Recent versions

- 0.0.14 (latest) — 2017-12-28
- 0.0.13 — 2017-12-28
- 0.0.12 — 2017-12-28
- 0.0.11 — 2017-12-28
- 0.0.10 — 2017-12-28
- 0.0.9 — 2017-12-28

## README

# Package to emulate git sub modules

### Installation 

    sudo npm install -g git-module

## Usage

[dsfsdf](./a.md)



### Prepare

Extend your package.json for the following root entry: 
 
```json

"modules": [
 {
   "name": "server-template",
   "options": {
     "repository": "https://github.com/gbaumgart/xcf-servers.git",
     "recursive": true,
     "directory": "server-template",
     "profile":"control-freak"
   },
   "clone": {
     "post": {
       "command": "git submodule foreach \"git checkout master\""
     }
   }
 }
]
```


### Commands

1. init-modules (clones modules into target folders, specified as above)
2. update-modules (updates modules via git pull)
3. commit-modules (commits and pushes modules via git commit and git push)
4. each-module (runs a shell command in each module)

### Default command options: 

**target**

This option allows you to change target directory for all modules: 

    git-module init-modules --target="./test"
    
**profile**

This option allows you to filter modules against "profile". Extend your module definition as seen above in the example
package.json.

    git-module init-modules --target="./test" --profile="control-freak"


### Command **init-modules**


Install git modules as specified in the package.json

    git-module init-modules

This will clone https://github.com/gbaumgart/xcf-servers.git in ./server-template and also checks out sub modules.
 

This will only process modules which have a "profile" set to "control-freak"

---
_Source: https://npm.io/package/@xblox/git-module · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
