Skip to content

Commit

Permalink
chore(compiler): allow the logger to be fully silent
Browse files Browse the repository at this point in the history
  • Loading branch information
Wassim CHEGHAM committed Feb 25, 2018
1 parent 99866c8 commit 5440f06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/modules/compiler/dist/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var path = require("path");
var ts = require("typescript");
var ngd_core_1 = require("@compodoc/ngd-core");
var Compiler = (function () {
var Compiler = /** @class */ (function () {
function Compiler(files, options) {
this.__cache = {};
this.__nsModule = {};
Expand All @@ -15,6 +15,8 @@ var Compiler = (function () {
tsconfigDirectory: options.tsconfigDirectory
};
this.program = ts.createProgram(this.files, transpileOptions, ngd_core_1.compilerHost(transpileOptions));
// silent this instance of the logger
ngd_core_1.logger.setVerbose(options.silent);
}
Compiler.prototype.getDependencies = function () {
var _this = this;
Expand Down Expand Up @@ -44,7 +46,7 @@ var Compiler = (function () {
var visitNode = function (visitedNode, index) {
var name = _this.getSymboleName(node);
var deps = {};
var metadata = node.decorators.pop();
var metadata = node.decorators[node.decorators.length - 1];
var props = _this.findProps(visitedNode);
if (_this.isModule(metadata)) {
deps = {
Expand Down
5 changes: 4 additions & 1 deletion src/modules/compiler/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export class Compiler {
tsconfigDirectory: options.tsconfigDirectory
};
this.program = ts.createProgram(this.files, transpileOptions, compilerHost(transpileOptions));

// silent this instance of the logger
logger.setVerbose(options.silent);
}

getDependencies() {
Expand Down Expand Up @@ -106,7 +109,7 @@ export class Compiler {

let name = this.getSymboleName(node);
let deps: Dependencies = <Dependencies>{};
let metadata = node.decorators.pop();
let metadata = node.decorators[ node.decorators.length-1 ];
let props = this.findProps(visitedNode);

if (this.isModule(metadata)) {
Expand Down

0 comments on commit 5440f06

Please sign in to comment.