mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Execute extension webpacking in sequence
This commit is contained in:
@@ -77,7 +77,7 @@ function fromLocalWebpack(extensionPath, sourceMappingURLBase) {
|
|||||||
return data;
|
return data;
|
||||||
}))
|
}))
|
||||||
.pipe(packageJsonFilter.restore);
|
.pipe(packageJsonFilter.restore);
|
||||||
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => {
|
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => () => {
|
||||||
const webpackDone = (err, stats) => {
|
const webpackDone = (err, stats) => {
|
||||||
util.log(`Bundled extension: ${util.colors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
|
util.log(`Bundled extension: ${util.colors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -118,7 +118,7 @@ function fromLocalWebpack(extensionPath, sourceMappingURLBase) {
|
|||||||
this.emit('data', data);
|
this.emit('data', data);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
es.merge(...webpackStreams, patchFilesStream)
|
es.merge(sequence(webpackStreams), patchFilesStream)
|
||||||
// .pipe(es.through(function (data) {
|
// .pipe(es.through(function (data) {
|
||||||
// // debug
|
// // debug
|
||||||
// console.log('out', data.path, data.contents.length);
|
// console.log('out', data.path, data.contents.length);
|
||||||
@@ -216,10 +216,10 @@ function packageExtensionsStream(optsIn) {
|
|||||||
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
||||||
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name));
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name));
|
||||||
const localExtensions = () => es.merge(...localExtensionDescriptions.map(extension => {
|
const localExtensions = () => sequence([...localExtensionDescriptions.map(extension => () => {
|
||||||
return fromLocal(extension.path, opts.sourceMappingURLBase)
|
return fromLocal(extension.path, opts.sourceMappingURLBase)
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
}));
|
})]);
|
||||||
const localExtensionDependencies = () => gulp.src('extensions/node_modules/**', { base: '.' });
|
const localExtensionDependencies = () => gulp.src('extensions/node_modules/**', { base: '.' });
|
||||||
const marketplaceExtensions = () => es.merge(...builtInExtensions
|
const marketplaceExtensions = () => es.merge(...builtInExtensions
|
||||||
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ function fromLocalWebpack(extensionPath: string, sourceMappingURLBase: string |
|
|||||||
.pipe(packageJsonFilter.restore);
|
.pipe(packageJsonFilter.restore);
|
||||||
|
|
||||||
|
|
||||||
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => {
|
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => () => {
|
||||||
|
|
||||||
const webpackDone = (err: any, stats: any) => {
|
const webpackDone = (err: any, stats: any) => {
|
||||||
util.log(`Bundled extension: ${util.colors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
|
util.log(`Bundled extension: ${util.colors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
|
||||||
@@ -139,7 +139,7 @@ function fromLocalWebpack(extensionPath: string, sourceMappingURLBase: string |
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
es.merge(...webpackStreams, patchFilesStream)
|
es.merge(sequence(webpackStreams), patchFilesStream)
|
||||||
// .pipe(es.through(function (data) {
|
// .pipe(es.through(function (data) {
|
||||||
// // debug
|
// // debug
|
||||||
// console.log('out', data.path, data.contents.length);
|
// console.log('out', data.path, data.contents.length);
|
||||||
@@ -270,10 +270,10 @@ export function packageExtensionsStream(optsIn?: IPackageExtensionsOptions): Nod
|
|||||||
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name));
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name));
|
||||||
|
|
||||||
const localExtensions = () => es.merge(...localExtensionDescriptions.map(extension => {
|
const localExtensions = () => sequence([...localExtensionDescriptions.map(extension => () => {
|
||||||
return fromLocal(extension.path, opts.sourceMappingURLBase)
|
return fromLocal(extension.path, opts.sourceMappingURLBase)
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
}));
|
})]);
|
||||||
|
|
||||||
const localExtensionDependencies = () => gulp.src('extensions/node_modules/**', { base: '.' });
|
const localExtensionDependencies = () => gulp.src('extensions/node_modules/**', { base: '.' });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user