@debitoor/parse-dependencies
finding node code dependencies
Last updated 3 years ago by s0ph1e .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @debitoor/parse-dependencies 
SYNC missed versions from official npm registry.

parse-dependencies

Fast and easy way to get dependencies for your code.

npm version Build Status Dependency Status devDependency Status Coverage Status

Install

npm i -SE @debitoor/parse-dependencies

Usage

const parse = require('@debitoor/parse-dependencies');
parse(__dirname + '/server.js', function (err, deps) {
  console.log(deps); // 'express', 'body-parser' ...
});

You can compare result with you production dependencies

const parse = require('@debitoor/parse-dependencies');
const packageDeps = require('./package').dependencies;

parse(__dirname + '/server.js', function (err, deps) {
  const diff = deps.filter(function (item) {
    return !(item in packageDeps);
  });
  if (diff.length) {
    console.log('oops. You have missing depencies\n%s', diff.join());
  }
});

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |