git-modules
git-modules is a multi scoped npm-repository based on a single git repository.
Last updated 5 years ago by agebrock .
Original npm · Tarball · package.json
$ cnpm install git-modules 
SYNC missed versions from official npm registry.

#git-modules git-modules is a multi scoped npm-repository based on a single git repository.

Setup

  • create a workspace (any directory will work)
  • create an empty "git-modules.json" inside your workspace (empty means "{}")
  • "git init" your workspace
  • create a package directory within workspace
  • create a scope inside the package directory (a directory starting with an "@" char)
  • create a node package inside a scope

If you did everything correctly, you should have a directory structure like this:

  • workspace/packages/@scope/mypackage/package.json
  • workspace/git-modules.json

HINT: You can change "@scope" to "@whateveryouwant"

Usage

Install git-modules

    npm install git-modules

Start repository server (cwd: workspace/node_modules/git-modules)

    node index.js

This will start a local bound npm server on port 9292 You can change the port by setting "port" in the "git-modles.json"

    {
        port:9393
    }

Publish your package (cwd: workspace/packages/@scope/mypackage)

   npm publish

Install the latest package

$ npm install @scope/mypackage

Install a specific version (use --save as usual if you want)

$ npm install @scope/mypackage@0.0.1

Using npm to create a patch version (cwd: workspace/packages/@scope/mypackage)

   npm version patch

Republish your patched package (cwd: workspace/packages/@scope/mypackage)

   npm publish

Use your package

var mypackage = require('@scope/mypackage');

How it works

We create a http server to simulate a npm repository. Under the hood we start some shell git commands on every http request. "git archive" is used to create the tar package we send to the npm client. The publishing is based on git tags.

Problems ? Questions ? Answers ? Happy to hear.

Current Tags

  • 0.1.20                                ...           latest (5 years ago)

4 Versions

  • 0.1.20                                ...           5 years ago
  • 0.1.19                                ...           5 years ago
  • 0.1.9                                ...           5 years ago
  • 0.1.8                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (10)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |