-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to use incremental builds API
Add debug and time logging Minor re-factoring Update unit tests Urigo/angular2-meteor#102
- Loading branch information
Showing
7 changed files
with
124 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const util = Npm.require('util'); | ||
|
||
DebugLog = class DebugLog { | ||
constructor(event) { | ||
this.debug = process.env.TYPESCRIPT_DEBUG; | ||
this.event = event; | ||
this.start(); | ||
} | ||
|
||
start() { | ||
if (this.debug) { | ||
console.log('%s started', this.event); | ||
console.time(util.format('%s time', this.event)); | ||
} | ||
} | ||
|
||
|
||
log(msg, ...args) { | ||
if (this.debug) { | ||
console.log.apply(null, [msg].concat(args)); | ||
} | ||
} | ||
|
||
end() { | ||
if (this.debug) { | ||
console.timeEnd(util.format('%s time', this.event)); | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FileMixin = { | ||
warn(error) { | ||
console.log(`${error.sourcePath} (${error.line}, ${error.column}): ${error.message}`); | ||
}, | ||
|
||
isBare() { | ||
let fileOptions = this.getFileOptions(); | ||
return fileOptions.bare; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
'use strict'; | ||
|
||
const meteorTS = Npm.require('meteor-typescript'); | ||
|
||
TypeScript = { | ||
|