Skip to content

Commit

Permalink
Clean up error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zeekay committed May 19, 2017
1 parent 0f7449b commit 37dccf5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/load.coffee
Expand Up @@ -47,9 +47,16 @@ loadSakefileTs = (dir, file) ->
return if cache.load dir, file

# Write straight to cache
exec.sync "tsc --types sake-core --outFile .sake/Sakefile.js Sakefile.ts"
cache.require dir
{stdout, stderr} = exec.sync "tsc --types sake-core --outFile .sake/Sakefile.js Sakefile.ts", quiet: true

# Check for and remove annoying error message
lines = stdout.split '\n'
if ~lines[0].indexOf 'error TS2688'
lines.splice 0, 2
console.log (stderr + lines.join '\n').trim()

# Load from cache
cache.require dir

export default load =
Cakefile: loadCakefile
Expand Down

0 comments on commit 37dccf5

Please sign in to comment.