added sourcemap support
This commit is contained in:
@ -68,6 +68,7 @@ module NpmtsCompile {
|
||||
})();
|
||||
|
||||
var tsStream = plugins.gulp.src(plugins.path.join(paths.cwd,key))
|
||||
.pipe(plugins.g.sourcemaps.init()) // This means sourcemaps will be generated
|
||||
.pipe(plugins.g.typescript({
|
||||
out: outputName,
|
||||
declaration: true,
|
||||
@ -76,6 +77,7 @@ module NpmtsCompile {
|
||||
var stream = plugins.mergeStream([
|
||||
tsStream.dts.pipe(plugins.gulp.dest(outputDir)),
|
||||
tsStream.js
|
||||
.pipe(plugins.g.sourcemaps.write()) // Now the sourcemaps are added to the .js file
|
||||
.pipe(plugins.g.header('#!/usr/bin/env node\n\n'))
|
||||
.pipe(plugins.gulp.dest(outputDir))
|
||||
]);
|
||||
|
@ -10,10 +10,12 @@ module NpmtsPlugins {
|
||||
header: require("gulp-header"),
|
||||
istanbul: require("gulp-istanbul"),
|
||||
mocha: require("gulp-mocha"),
|
||||
sourcemaps: require("gulp-sourcemaps"),
|
||||
typescript: require("gulp-typescript")
|
||||
|
||||
},
|
||||
mergeStream: require("merge2"),
|
||||
sourceMapSupport:require("source-map-support").install(),
|
||||
path: require("path"),
|
||||
q:require("q"),
|
||||
smartcli: require("smartcli"),
|
||||
|
Reference in New Issue
Block a user