Skip to content
Permalink
Browse files

fix(server): typescript watch

  • Loading branch information
jyounce committed Aug 31, 2016
1 parent 1747c29 commit 3a6791d53b23e17de2c38252af00547ebd817ab8
Showing with 9 additions and 4 deletions.
  1. +8 −3 src/helpers/TsProject.coffee
  2. +1 −1 src/tasks/compile/typescript-server.coffee
@@ -27,7 +27,7 @@ class TsProject
# ===========================================
class Typescript
constructor: (@id, @ts, @tsconfig, @opts={}) ->
@setProject()
return @setProject().getProject()

setProject: ->
if help.hasTsConfig @tsconfig
@@ -36,15 +36,20 @@ class TsProject
@project = @ts.createProject @opts
@

getProject: ->
@project

# static method to retrieve an
# instance or create a new one
# ============================
@get: (id, ts, tsconfig, opts) ->
if not instances[id] # create new instance
# console.log "TS INSTANCE ID: #{id}".alert
instances[id] = new Typescript id, ts, tsconfig, opts
instances[id]
instances[id].project

# Export Class!
# =============
module.exports = TsProject
module.exports = TsProject


@@ -31,7 +31,7 @@ module.exports = (config, gulp, taskOpts={}) ->
fileBase = paths.src
tsProject = TsProject.get 'server', ts, paths.tsconfig
gulp.src src
.pipe(ts tsProject.project).js
.pipe(ts tsProject).js
.pipe updateFileBase fileBase
.pipe gulp.dest paths.dest
.on 'end', -> defer.resolve()

0 comments on commit 3a6791d

Please sign in to comment.
You can’t perform that action at this time.