Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagofabre committed May 12, 2017
1 parent 2a0c83f commit b1eed1d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
'use strict';
const path = require('path');
const reader = require('../lib/reader');
const searcher = require('../lib/searcher');
const reporter = require('../lib/reporter');
const log = require('../lib/log-color');
const builder = require('../lib/dependency-builder')
const builder = require('../lib/dependency-builder');

module.exports = function run (directory, options = {}) {
return new Promise((resolve, reject) => {
Expand All @@ -18,15 +17,14 @@ module.exports = function run (directory, options = {}) {
}

const files = searcher.searchJsFiles(directory, [], options.ignore);

const dependencies = builder.buildDependencies(packageJson, options);
const result = builder.buildResult(files, dependencies);
const requires = builder.buildRequires(files);

const jsonReport = reporter.jsonReport(result, dependencies, requires);

if (options.summary) {
let missingDependencies = new Set(builder.buildMissingDependencies(files, dependencies));
const missingDependencies = new Set(builder.buildMissingDependencies(files, dependencies));
reporter.summary(jsonReport, Array.from(missingDependencies));
} else {
if (jsonReport.unused !== 'None.' && options.ci) {
Expand Down

0 comments on commit b1eed1d

Please sign in to comment.