straighten up ts compilation
This commit is contained in:
parent
2730ca4299
commit
6227e47037
13
index.js
13
index.js
@ -167,20 +167,15 @@ var NpmtsCompile;
|
||||
return plugins.path.join(paths.cwd, config.ts[key]);
|
||||
}
|
||||
})();
|
||||
var tsStream = plugins.gulp.src([plugins.path.join(paths.cwd, key), "!**/typings/**"])
|
||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, key), "!**/typings/**"])
|
||||
.pipe(plugins.g.sourcemaps.init()) // This means sourcemaps will be generated
|
||||
.pipe(plugins.g.typescript({
|
||||
out: outputName,
|
||||
declaration: true,
|
||||
target: "ES5",
|
||||
module: "commonjs"
|
||||
}));
|
||||
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.gulp.dest(outputDir))
|
||||
]);
|
||||
}))
|
||||
.pipe(plugins.g.sourcemaps.write()) // Now the sourcemaps are added to the .js file
|
||||
.pipe(plugins.gulp.dest(outputDir));
|
||||
moduleStream.add(stream);
|
||||
}
|
||||
moduleStream.on("queueDrain", function () {
|
||||
|
@ -30,7 +30,6 @@
|
||||
"fs-extra": "^0.26.5",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-coveralls": "^0.1.4",
|
||||
"gulp-header": "^1.7.1",
|
||||
"gulp-istanbul": "^0.10.3",
|
||||
"gulp-mocha": "^2.2.0",
|
||||
"gulp-sourcemaps": "^1.6.0",
|
||||
|
4
test/assets/dist/index.d.ts
vendored
4
test/assets/dist/index.d.ts
vendored
@ -1,4 +0,0 @@
|
||||
/// <reference path="typings/main.d.ts" />
|
||||
declare var testplugin: {
|
||||
logSomething: () => void;
|
||||
};
|
@ -67,21 +67,16 @@ module NpmtsCompile {
|
||||
}
|
||||
})();
|
||||
|
||||
var tsStream = plugins.gulp.src([plugins.path.join(paths.cwd,key),"!**/typings/**"])
|
||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,key),"!**/typings/**"])
|
||||
.pipe(plugins.g.sourcemaps.init()) // This means sourcemaps will be generated
|
||||
.pipe(plugins.g.typescript({
|
||||
out: outputName,
|
||||
declaration: true,
|
||||
target: "ES5",
|
||||
module: "commonjs"
|
||||
}));
|
||||
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))
|
||||
]);
|
||||
}))
|
||||
.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));
|
||||
moduleStream.add(stream);
|
||||
}
|
||||
moduleStream.on("queueDrain",function(){
|
||||
|
Loading…
Reference in New Issue
Block a user