{"_id":"@arcanis/npm-git-install","_rev":"7-707a9bb3b6a0cdc23da0bd2ce294845e","name":"@arcanis/npm-git-install","description":"Clone and (re)install packages from remote git repos. It is meant as a temporary solution until [npm/npm#3055][3055] is resolved.","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@arcanis/npm-git-install","version":"0.1.0","license":"ISC","main":"build/index.js","bin":{"npm-git":"build/cli.js"},"scripts":{"prepare":"coffee --no-header -cbmo build src","develop":"coffee --watch --no-header -cbmo build src"},"dependencies":{"commander":"^2.9.0","temp":"^0.8.3"},"devDependencies":{"coffee-script":"^1.10.0"},"gitHead":"96b458abcd4348af833ae6d7b2bc08dd4db49454","description":"NPM Git Install ===============","_id":"@arcanis/npm-git-install@0.1.0","_shasum":"8cfd80baa74a3411b6b45260982887e6cc8195ab","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"arcanis","email":"nison.mael@gmail.com"},"dist":{"shasum":"8cfd80baa74a3411b6b45260982887e6cc8195ab","tarball":"https://registry.npmjs.org/@arcanis/npm-git-install/-/npm-git-install-0.1.0.tgz","integrity":"sha512-tAnqEB4dqJax8l3n8qKBTjL6UBUOmgRoCHDTEVecPyNEiZwbEoFhd2ccjbaEGs5tZhtZixVaURnKY5sxIr7u7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDla3/TUp/unRLVuu0xID+aQTcj/+TPbC8nTcI58GrjXAIgKg31XK7Z4nuTdabUbyYEkNw/BomBvDu+P8Vlz2Yi728="}]},"maintainers":[{"name":"arcanis","email":"nison.mael@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/npm-git-install-0.1.0.tgz_1485119131633_0.8978771856054664"}},"0.1.1":{"name":"@arcanis/npm-git-install","version":"0.1.1","license":"ISC","main":"build/index.js","bin":{"npm-git":"build/cli.js"},"scripts":{"prepare":"coffee --no-header -cbmo build src","develop":"coffee --watch --no-header -cbmo build src"},"dependencies":{"commander":"^2.9.0","temp":"^0.8.3"},"devDependencies":{"coffee-script":"^1.10.0"},"gitHead":"22be68417879af8fdb0e4f385e7f4f55d455c06a","description":"NPM Git Install ===============","_id":"@arcanis/npm-git-install@0.1.1","_shasum":"717717245a9c7b215d7dbbbeec37543432862896","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"arcanis","email":"nison.mael@gmail.com"},"dist":{"shasum":"717717245a9c7b215d7dbbbeec37543432862896","tarball":"https://registry.npmjs.org/@arcanis/npm-git-install/-/npm-git-install-0.1.1.tgz","integrity":"sha512-9DWDmwhXNJhdqG6/h3yzZ67LTj8eerVuA0pGaHPrs+ruvEhOA/gswz2BeeGPNcovLuPoetqfGzIkt5JTGJ0i6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+xlTF0snPOuYBFFUirBjTMvrCKsy8YAuAEbwMmVs9PwIgCEhMoYnKjcV76YKKKmxQ9t2n7F1fWHLwxrXwl3hlXb0="}]},"maintainers":[{"name":"arcanis","email":"nison.mael@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/npm-git-install-0.1.1.tgz_1485201690770_0.9924411468673497"}},"0.1.4":{"name":"@arcanis/npm-git-install","version":"0.1.4","license":"ISC","main":"build/index.js","bin":{"npm-git":"build/cli.js"},"scripts":{"prepare":"coffee --no-header -cbmo build src","develop":"coffee --watch --no-header -cbmo build src"},"dependencies":{"commander":"^2.9.0","temp":"^0.8.3"},"devDependencies":{"coffee-script":"^1.10.0"},"gitHead":"03cf7b8879b93bc22fa5ce63d2ee65e1ddf0507c","description":"NPM Git Install ===============","_id":"@arcanis/npm-git-install@0.1.4","_shasum":"8d2c9d48abd87ebd4ba7bcefec45f9b1c8802262","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"arcanis","email":"nison.mael@gmail.com"},"dist":{"shasum":"8d2c9d48abd87ebd4ba7bcefec45f9b1c8802262","tarball":"https://registry.npmjs.org/@arcanis/npm-git-install/-/npm-git-install-0.1.4.tgz","integrity":"sha512-f3TQF8odhp3cv6pBz2P32LmLkt2ui0n2PZfbrc2LhtLGAEAislXKq7v00pfe2bClwHP4YsAFCnxgg2eD15eg6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF27yyBSq09yrsIGAGOPeacuh1r3fqAkRRQItswgrYr4AiAMuaJMhqB1rlP1lbRWtnVQD62McpDQUVqkaN2bmfKd2g=="}]},"maintainers":[{"name":"arcanis","email":"nison.mael@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/npm-git-install-0.1.4.tgz_1485204683160_0.41592430928722024"}},"0.2.0":{"name":"@arcanis/npm-git-install","version":"0.2.0","license":"ISC","main":"build/index.js","bin":{"npm-git":"build/cli.js"},"scripts":{"prepare":"coffee --no-header -cbmo build src","develop":"coffee --watch --no-header -cbmo build src"},"dependencies":{"commander":"^2.9.0","temp":"^0.8.3"},"devDependencies":{"coffee-script":"^1.10.0"},"gitHead":"25c893cba1ada436ed75e5525aae230f0a1bf5bb","description":"NPM Git Install ===============","_id":"@arcanis/npm-git-install@0.2.0","_shasum":"5726cbe4d3613ae9b9da670a9636e3ea9c21ad12","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"arcanis","email":"nison.mael@gmail.com"},"dist":{"shasum":"5726cbe4d3613ae9b9da670a9636e3ea9c21ad12","tarball":"https://registry.npmjs.org/@arcanis/npm-git-install/-/npm-git-install-0.2.0.tgz","integrity":"sha512-t0wGQCEzx/hogr6hS+3Je6scBCZQvCuamKYlOIP7cipdksxRG5oVhT8J/sOJ1Y0zTnsXkbztuoDJE1QUysfZYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG7BK/adh13E/oFTeUEGBS0qNyzVeQSvI/7Am8P2qW+OAiEA/g00wFlZhVBwxYI/QwcaCAIcpx+cvFlh6RkoHQLW69c="}]},"maintainers":[{"name":"arcanis","email":"nison.mael@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/npm-git-install-0.2.0.tgz_1485205411806_0.2599348961375654"}},"0.2.1":{"name":"@arcanis/npm-git-install","version":"0.2.1","license":"ISC","main":"build/index.js","bin":{"npm-git":"build/cli.js"},"scripts":{"prepare":"coffee --no-header -cbmo build src","develop":"coffee --watch --no-header -cbmo build src"},"dependencies":{"commander":"^2.9.0","temp":"^0.8.3"},"devDependencies":{"coffee-script":"^1.10.0"},"gitHead":"d524be2ae04a270d89f09235dc1d724a91c6d071","description":"NPM Git Install ===============","_id":"@arcanis/npm-git-install@0.2.1","_shasum":"9c61c0508f7b438bb2a11638482dd3f0177d52e3","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"arcanis","email":"nison.mael@gmail.com"},"dist":{"shasum":"9c61c0508f7b438bb2a11638482dd3f0177d52e3","tarball":"https://registry.npmjs.org/@arcanis/npm-git-install/-/npm-git-install-0.2.1.tgz","integrity":"sha512-VqTm2k+jIspVOHURV/gmPPFbf7g8adWuFsC1FjpCczjAH3dv0XrsmjjzBISB8i+NRsfeRmkxztWR8M/vGFRkfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH0FqjYM+pJDHDhBbtuLbiBTc5yx0DOjYsmaOGPSlQQfAiAU/Czb8uIenOupQ3KlAT1TVzcEN+QsPYQpNcnDq2Qwtw=="}]},"maintainers":[{"name":"arcanis","email":"nison.mael@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/npm-git-install-0.2.1.tgz_1485206950656_0.29492348339408636"}},"0.3.0":{"name":"@arcanis/npm-git-install","version":"0.3.0","license":"ISC","main":"build/index.js","bin":{"npm-git":"build/cli.js"},"scripts":{"prepare":"coffee --no-header -cbmo build src","develop":"coffee --watch --no-header -cbmo build src"},"dependencies":{"commander":"^2.9.0","temp":"^0.8.3"},"devDependencies":{"coffee-script":"^1.10.0"},"gitHead":"fd5609297081b898afc26209c0f8d3491f1d2d26","description":"Clone and (re)install packages from remote git repos. It is meant as a temporary solution until [npm/npm#3055][3055] is resolved.","_id":"@arcanis/npm-git-install@0.3.0","_shasum":"841859b42250d3a729f168d42028c78834442ef1","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"arcanis","email":"nison.mael@gmail.com"},"dist":{"shasum":"841859b42250d3a729f168d42028c78834442ef1","tarball":"https://registry.npmjs.org/@arcanis/npm-git-install/-/npm-git-install-0.3.0.tgz","integrity":"sha512-hTueG+6SGivw1lZfBhjvTl29IU4QKZCKm3bmftmnmVd786VBP6/6dCR+sJUtyldcEn5ojb/4C58GB8a4UOk5RQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkvZ3316TIKEb/6yibrOj3P14/JyTs4RsukyAc0ZNZUAIhANAfK0FvL8glhgqYOdUnHrLRKFxcmPhPb5GjU6CdMr4i"}]},"maintainers":[{"name":"arcanis","email":"nison.mael@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/npm-git-install-0.3.0.tgz_1490387618285_0.654973316937685"}}},"readme":"# NPM Git Install\n\nClone and (re)install packages from remote git repos. It is meant as a temporary solution until [npm/npm#3055][3055] is resolved.\n\n## Installation\n\n```sh\n$> npm install --save @arcanis/npm-git-install\n```\n\n## Usage\n\nIn your `package.json`, add:\n\n```javascript\n{\n  \"scripts\": {\n    \"install\": \"npm-git install\"\n  }\n  \"gitDependencies\": {\n    \"private-package-name\": \"git@private.git.server:user/repo.git#revision?/inner/path\",\n    \"public-package-name\": \"https://github.com/user/repo.git#revision?/inner/path\"\n  }\n}\n```\n\nDon't forget to replace `*-package-name` and git URLs with values relevant to your project. URLs have to be in canonical form (i.e. one that you would provide to `git clone` on command line) - no fancy NPM shortcuts like ~~`user/repo`~~ or ~~`bitbucket:user/repo`~~. If you want this, we are open for a PRs.\n\nOnce your package.json has been updated, you can now install your dependencies as usual:\n\n```sh\n$> npm install\n```\n\n## Why\n\nThere's a serious defect in current versions of NPM (and Yarn) regarding installation process of dependencies from git repositories. It basically prevents us from installing anything that needs a build step directly from git repos. Because of that some authors are keeping build artifacts in the repos, which I would consider a hurdle at best, and contributors are sometimes hindered from using their own forks, lowering contributions. Here isthe  [relevant issue][3055], with ongoing discussion.\n\n### TL/DR:\n\nIf you `npm install ../some-local-directory/my-package` then npm will run the `prepare` script of `my-package`, then install it in the current project. This is fine.\n\nNow, one would expect that running `npm install git@remote-git-server:me/my-package.git` would also run `prepare` before installing, but for some reasons it won't. Even worse, it will apply `.npmignore`, which will most likely remove all your source files and make it hard to recover. Not great.\n\n## How\n\n### From command line\n\n```sh\n$> npm-git install\n```\n\nThis simple script will do the following for every url inside the `gitDependencies` section of your `package.json` file:\n\n1.  Clone the repository into a temporary directory.\n2.  Run `npm install` in the temporary directory, which will in turn trigger the `prepare` hook of the package being installed\n3.  Copy the generated module  in your project path.\n\nIn effect you will get your dependency properly installed.\n\nYou can optionally specify different paths for `package.json`:\n\n```sh\nnpm-git install -c git-dependencies.json\n```\n\nYou may want to do this if you find it offensive to put non-standard section in your `package.json`.\n\nAlso try `--help` for more options.\n\nJust like with plain NPM, on the command line you can specify a space separated list of packages to be installed:\n\n```sh\nnpm-git install https://github.com/someone/awesome.git me@git.server.com/me/is-also-awesome.git#experimantal-branch\n```\n\nAfter hash you can specify a branch name, tag or a specific commit's sha. By default `master` branch is used.\n\n### API\n\nYou can also use it programmatically. Just require `npm-git-install`. It exposes four methods:\n\n  * `discover (path)`\n\n    Reads list of packages from file at given path (e.g. a package.json) and returns array of `{url, revision}` objects. You can supply this to `reinstall_all` method.\n\n  * `reinstall_all (options, packages)`\n\n    Executes `reinstall` in series for each package in `packages`. Options are also passed to each `reinstall` call.\n\n    This function is curried, so if you provide just `options` argument you will get a new function that takes only one argument - `packages` array.\n\n    Options are the same as for `reinstall`.\n\n    Returns a `Promise` that resolves to `report`, i.e. an array of `metadata` objects:\n\n    ```coffee-script\n    [ {\n      name: \"my-awesome-thing\"\n      sha: \"ef88c40\"\n      url: \"me@git.server.com/me/my-awesome-thing.git\"\n    } ]\n    ```\n\n  * `reinstall (options, package)`\n\n    Most of the heavy lifting happens here:\n\n    1.  Clone the repo at `package.url`,\n    2.  Checkout `package.revision`,\n    3.  Run `npm install` inside the cloned repos directories,\n    4.  Install the package from there.\n\n    Options are:\n\n    * `silent`: Suppress child processes standard output. Boolean. Default is `false`.\n    * `verbose`: Print debug messages. Boolean. Default is `false`.\n\n    Returns a `Promise` that will resolve to a `metadata` object:\n\n    ```coffee-script\n    {\n      name: \"my-awesome-thing\"\n      sha: \"ef88c40\"\n      url: \"me@git.server.com/me/my-awesome-thing.git\"\n    }\n    ```\n\n    You probably don't want to use it directly. Just call `reinstall_all` with relevant options.\n\nIf you are a [Gulp][] user, then it should be easy enough to integrate it with your gulpfile. See [./src/cli.coffee][] for example use of the API.\n\n### Why not use `dependencies` and `devDependencies`\n\nI tried and it's hard, because NPM supports [fancy things as Git URLs][URLs]. See `messy-auto-discovery` branch. You are welcome to take it from where I left.\n\nThere is also another reason. User may not want to reinstall all Git dependencies this way. For example I use gulp version 4, which is only available from GitHub and it is perfectly fine to install it with standard NPM. I don't want to rebuild it on my machine every time I install it. Now I can leave it in `devDependencies` and only use `npm-git-install` for stuff that needs it.\n\n[URLs]: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies\n[3055]: https://github.com/npm/npm/issues/3055\n[Gulp]: http://gulpjs.com/\n","maintainers":[{"name":"arcanis","email":"nison.mael@gmail.com"}],"time":{"modified":"2022-06-12T14:47:08.761Z","created":"2017-01-22T21:05:32.357Z","0.1.0":"2017-01-22T21:05:32.357Z","0.1.1":"2017-01-23T20:01:31.503Z","0.1.4":"2017-01-23T20:51:23.899Z","0.2.0":"2017-01-23T21:03:33.601Z","0.2.1":"2017-01-23T21:29:11.296Z","0.3.0":"2017-03-24T20:33:40.183Z"},"license":"ISC","readmeFilename":"README.md"}