get-package-json-from-github

1.2.1 • Public • Published

get-package-json-from-github

Get package.json from github

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install get-package-json-from-github --save

Usage

import getPackageJsonFromGithub from 'get-package-json-from-github';
 
getPackageJsonFromGithub('git+https://github.com/kesla/get-package-json-from-github.git')
  .then(packageJson => {
    console.log('packageJson', packageJson);
  });
 
// can also load a caching version
 
const cached = getPackageJsonFromGithub.cached();
 
cached('git+https://github.com/kesla/get-package-json-from-github.git')
  .then(packageJson => {
    console.log('packageJson', packageJson);
  });
 

Tests

npm install
npm test

Dependencies

  • async-cache-promise: async-cache - but with promises
  • gh-got: Convenience wrapper for got to interact with the GitHub API
  • immutable-object-methods: Update normal plain javascript object, immutable style. Simlar to how immutable.js, seamless-immutable etc does it but a lot smaller and simpler.
  • npm-package-arg: Parse the things that can be arguments to npm install

Dev Dependencies

License

MIT

Generated by package-json-to-readme

Readme

Keywords

none

Package Sidebar

Install

npm i get-package-json-from-github

Weekly Downloads

842

Version

1.2.1

License

MIT

Last publish

Collaborators

  • kesla