1 | 'use strict';
|
2 |
|
3 | const Reporter = require('./lib/reporter');
|
4 | const DependencyChecker = require('./lib/dependency-checker');
|
5 |
|
6 | module.exports = {
|
7 | name: 'ember-cli-dependency-checker',
|
8 | init: function() {
|
9 | this._super.init && this._super.init.apply(this, arguments);
|
10 |
|
11 |
|
12 | const emberPosition = process.argv.findIndex(arg => arg.endsWith('/ember'));
|
13 | const ranWithInit = process.argv[emberPosition + 1] === 'init';
|
14 |
|
15 | if (!ranWithInit) {
|
16 | const reporter = new Reporter();
|
17 | const dependencyChecker = new DependencyChecker(this.project, reporter);
|
18 | dependencyChecker.checkDependencies();
|
19 | }
|
20 | }
|
21 | };
|