Is it possible to clone the git repositories when installing NPM packages from git?

Ionică Bizău

I have a package.json like this:

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
      "some-module": "git+ssh://[email protected]/IonicaBizau/some-module.git"
  },
  "author": "",
  "license": "ISC"
}

When I do npm install everything is installed correctly, but I would like to install the package from my repository by cloning the repository too, so in node_modules/some-module I will have a git repository cloned from GitHub.

How can I do that? Is there a built-in option for that or should I build my own tools?

Ionică Bizău

I created gpm - a tool that install the dependencies from git.

git + npm === gpm


To install gpm do:

npm i -g gpm

Then you can do:

gpm -i some-module

This will install the dependencies from git repositories, recursively.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to clone a list of GIT repositories?

From Dev

Git clone not working with npm

From Dev

How to git clone with external linked repositories in branch?

From Dev

clone a branch from GIT

From Dev

Is a Git clone without content possible?

From Dev

how to get packages from git using node's npm

From Dev

Is it possible to get branch names without clone or pull from git?

From Dev

problems when installing git

From Dev

problems when installing git

From Dev

Installing Theano from Git

From Dev

Installing things from git

From Dev

Npm errors when installing packages on windows share

From Dev

When to use Git Clone and Git Pull?

From Dev

Installing Atom packages with git port blocked

From Dev

Getting "Permission denied (publickey)" when tryhing to clone from Git repo

From Java

git clone from another directory

From Dev

Adding Skins from Git Clone

From Dev

Clone Yii project from git

From Dev

Is it possible to make git clone recursive by default?

From Dev

Is it possible to clone git-p4 repo?

From Dev

Is it possible to clone only part of a git project?

From Dev

Git error when installing with Vundle

From Dev

Warning when installing Git with Homebrew

From Dev

I get ArgumentException String is not a valid semantic version when installing npm packages from the quickstart guide

From Dev

Restore git history from split repositories

From Dev

Installing non-public packages from Gitlab using devtools::install_git

From Dev

How to install packages from git

From Dev

How to use npm link with git repositories only accessible with ssh

From Dev

How to use npm link with git repositories only accessible with ssh

Related Related

HotTag

Archive