|
|
|
@ -35,7 +35,7 @@ gulp.task('release', ['clean-release'], function() {
|
|
|
|
|
'node_modules/monaco-editor-core/monaco.d.ts',
|
|
|
|
|
'node_modules/monaco-editor-core/ThirdPartyNotices.txt',
|
|
|
|
|
'README.md'
|
|
|
|
|
]).pipe(gulp.dest('release'))
|
|
|
|
|
]).pipe(addPluginDTS()).pipe(gulp.dest('release'))
|
|
|
|
|
)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -48,13 +48,6 @@ function releaseOne(type) {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function mergePluginsContribsIntoCore(coreStream) {
|
|
|
|
|
return (
|
|
|
|
|
coreStream
|
|
|
|
|
.pipe(addPluginContribs())
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function pluginStreams(destinationPath) {
|
|
|
|
|
return es.merge(
|
|
|
|
|
metadata.METADATA.PLUGINS.map(function(plugin) {
|
|
|
|
@ -127,3 +120,31 @@ function addPluginContribs() {
|
|
|
|
|
this.emit('data', data);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Edit monaco.d.ts:
|
|
|
|
|
* - append monaco.d.ts from plugins
|
|
|
|
|
*/
|
|
|
|
|
function addPluginDTS() {
|
|
|
|
|
return es.through(function(data) {
|
|
|
|
|
if (!/monaco\.d\.ts$/.test(data.path)) {
|
|
|
|
|
this.emit('data', data);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var contents = data.contents.toString();
|
|
|
|
|
|
|
|
|
|
var extraContent = [];
|
|
|
|
|
metadata.METADATA.PLUGINS.forEach(function(plugin) {
|
|
|
|
|
var dtsPath = path.join(plugin.path, 'monaco.d.ts');
|
|
|
|
|
try {
|
|
|
|
|
extraContent.push(fs.readFileSync(dtsPath).toString());
|
|
|
|
|
} catch (err) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
contents += '\n' + extraContent.join('\n');
|
|
|
|
|
data.contents = new Buffer(contents);
|
|
|
|
|
this.emit('data', data);
|
|
|
|
|
});
|
|
|
|
|
}
|