       'lib/typings.d.ts'
     ], {restore: true}
 
-    writeSourceMap = (streamSrc) ->
-      streamSrc
-        .pipe $.if runOptions.sourcemaps, do $.sourcemaps.init
-        .pipe $.if runOptions.sourcemaps
-        , $.sourcemaps.write distMapDir
-          ,
-            sourceRoot: path.join do process.cwd, 'src'
-
     jsStream = merge [
       gulp.src [
         paths.srcDir.srcJs


  {paths, tsOptions, runOptions, pkgInfo} = conf

  distMapDir = path.relative paths.distDir.mapDir, paths.distDir.jsDir

  tsProject =
    $.typescript.createProject paths.tsconf, tsOptions

      .pipe dtsFilter

    merge [
      jsStream
        .pipe $.if runOptions.sourcemaps
        , $.sourcemaps.write distMapDir
          ,
            sourceRoot: path.join do process.cwd, 'src'
        .pipe gulp.dest paths.distDir.jsDir
      dtsStream
        .pipe gulp.dest paths.distDir.dtsDir
    ]

