提交 c93fe0d5 编写于 作者: J Johannes Rieken

ensure uploading source maps happens *after* they have been created

上级 8319bfbb
...@@ -451,7 +451,7 @@ gulp.task('vscode-translations-import', function () { ...@@ -451,7 +451,7 @@ gulp.task('vscode-translations-import', function () {
// Sourcemaps // Sourcemaps
gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => { gulp.task('upload-vscode-sourcemaps', ['vscode-darwin-min'/*here to ensure webpack has happened*/, 'minify-vscode'], () => {
const vs = gulp.src('out-vscode-min/**/*.map', { base: 'out-vscode-min' }) const vs = gulp.src('out-vscode-min/**/*.map', { base: 'out-vscode-min' })
.pipe(es.mapSync(f => { .pipe(es.mapSync(f => {
f.path = `${f.base}/core/${f.relative}`; f.path = `${f.base}/core/${f.relative}`;
......
...@@ -36,6 +36,7 @@ function fromLocal(extensionPath, sourceMappingURLBase) { ...@@ -36,6 +36,7 @@ function fromLocal(extensionPath, sourceMappingURLBase) {
// and merge its output with the files stream. also rewrite the package.json // and merge its output with the files stream. also rewrite the package.json
// file to a new entry point // file to a new entry point
if (fs.existsSync(path.join(extensionPath, 'extension.webpack.config.js'))) { if (fs.existsSync(path.join(extensionPath, 'extension.webpack.config.js'))) {
console.log("Using Webpack for \"" + extensionPath + "\"");
var packageJsonFilter = filter('package.json', { restore: true }); var packageJsonFilter = filter('package.json', { restore: true });
var patchFilesStream = filesStream var patchFilesStream = filesStream
.pipe(packageJsonFilter) .pipe(packageJsonFilter)
...@@ -67,6 +68,7 @@ function fromLocal(extensionPath, sourceMappingURLBase) { ...@@ -67,6 +68,7 @@ function fromLocal(extensionPath, sourceMappingURLBase) {
fs.mkdirSync(path.dirname(data.path)); fs.mkdirSync(path.dirname(data.path));
} }
fs.writeFileSync(data.path, data.contents); fs.writeFileSync(data.path, data.contents);
console.log("Webpack source maps saved as \"" + data.path + "\"");
} }
} }
this.emit('data', data); this.emit('data', data);
......
...@@ -40,6 +40,8 @@ export function fromLocal(extensionPath: string, sourceMappingURLBase?: string): ...@@ -40,6 +40,8 @@ export function fromLocal(extensionPath: string, sourceMappingURLBase?: string):
// and merge its output with the files stream. also rewrite the package.json // and merge its output with the files stream. also rewrite the package.json
// file to a new entry point // file to a new entry point
if (fs.existsSync(path.join(extensionPath, 'extension.webpack.config.js'))) { if (fs.existsSync(path.join(extensionPath, 'extension.webpack.config.js'))) {
console.log(`Using Webpack for "${extensionPath}"`);
const packageJsonFilter = filter('package.json', { restore: true }); const packageJsonFilter = filter('package.json', { restore: true });
const patchFilesStream = filesStream const patchFilesStream = filesStream
...@@ -74,6 +76,7 @@ export function fromLocal(extensionPath: string, sourceMappingURLBase?: string): ...@@ -74,6 +76,7 @@ export function fromLocal(extensionPath: string, sourceMappingURLBase?: string):
fs.mkdirSync(path.dirname(data.path)); fs.mkdirSync(path.dirname(data.path));
} }
fs.writeFileSync(data.path, data.contents); fs.writeFileSync(data.path, data.contents);
console.log(`Webpack source maps saved as "${data.path}"`);
} }
} }
this.emit('data', data); this.emit('data', data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册