mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
wip
This commit is contained in:
@@ -18,6 +18,7 @@ import ts = require('typescript');
|
||||
import * as File from 'vinyl';
|
||||
import * as task from './task';
|
||||
import { Mangler } from './mangleTypeScript';
|
||||
import { RawSourceMap } from 'source-map';
|
||||
const watch = require('./watch');
|
||||
|
||||
|
||||
@@ -125,10 +126,11 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod
|
||||
if (build) {
|
||||
let ts2tsMangler = new Mangler(compile.projectPath);
|
||||
const newContentsByFileName = ts2tsMangler.computeNewFileContents();
|
||||
mangleStream = es.through(function write(data: File) {
|
||||
mangleStream = es.through(function write(data: File & { sourceMap?: RawSourceMap }) {
|
||||
const newContents = newContentsByFileName.get(data.path);
|
||||
if (newContents !== undefined) {
|
||||
data.contents = Buffer.from(newContents);
|
||||
data.contents = Buffer.from(newContents.out);
|
||||
data.sourceMap = newContents.sourceMap && JSON.parse(newContents.sourceMap);
|
||||
}
|
||||
this.push(data);
|
||||
}, function end() {
|
||||
|
||||
Reference in New Issue
Block a user