 
   {paths, tsOptions, runOptions, pkgInfo} = conf
 
-  distMapDir = path.relative paths.distDir.mapDir, paths.distDir.jsDir
+  distMapDir = path.relative paths.distDir.jsDir, paths.distDir.mapDir
 
   tsProject =
     $.typescript.createProject paths.tsconf, tsOptions

      '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

      .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
    ]

