diff --git a/gulpfile.js b/gulpfile.js index fac6248f..d2a62ab0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,6 +7,7 @@ var fs = require('fs'); var rimraf = require('rimraf'); var cp = require('child_process'); var httpServer = require('http-server'); +var typedoc = require("gulp-typedoc"); var WEBSITE_GENERATED_PATH = path.join(__dirname, 'website/playground/new-samples'); var MONACO_EDITOR_VERSION = (function() { @@ -238,22 +239,38 @@ gulp.task('clean-website', function(cb) { rimraf('../monaco-editor-website', { m gulp.task('website', ['clean-website'], function() { return ( - gulp.src('website/**/*', { dot: true }) - .pipe(es.through(function(data) { - if (!data.contents || !/\.(html)$/.test(data.path)) { - return this.emit('data', data); - } + es.merge( + gulp.src('website/**/*', { dot: true }) + .pipe(es.through(function(data) { + if (!data.contents || !/\.(html)$/.test(data.path)) { + return this.emit('data', data); + } - var contents = data.contents.toString(); - contents = contents.replace(/\.\.\/release\/dev/g, 'node_modules/monaco-editor/min'); - contents = contents.replace(/{{version}}/g, MONACO_EDITOR_VERSION); - // contents = contents.replace('© 2016 Microsoft', '© 2016 Microsoft [' + builtTime + ']'); + var contents = data.contents.toString(); + contents = contents.replace(/\.\.\/release\/dev/g, 'node_modules/monaco-editor/min'); + contents = contents.replace(/{{version}}/g, MONACO_EDITOR_VERSION); + // contents = contents.replace('© 2016 Microsoft', '© 2016 Microsoft [' + builtTime + ']'); - data.contents = new Buffer(contents); + data.contents = new Buffer(contents); + + this.emit('data', data); + })) + .pipe(gulp.dest('../monaco-editor-website')), + + // node_modules\.bin\typedoc --mode file --out out src\monaco.d.ts --includeDeclarations --theme default --entryPoint monaco --name "Monaco Editor v0.7.0 API" --readme none --hideGenerator + gulp.src('monaco.d.ts') + .pipe(typedoc({ + mode: 'file', + out: '../monaco-editor-website/api', + includeDeclarations: true, + theme: 'default', + entryPoint: 'monaco', + name: 'Monaco Editor API v' + MONACO_EDITOR_VERSION, + readme: 'none', + hideGenerator: true + })) + ) - this.emit('data', data); - })) - .pipe(gulp.dest('../monaco-editor-website')) .pipe(es.through(function(data) { this.emit('data', data); }, function() { @@ -366,22 +383,22 @@ gulp.task('generate-test-samples', function() { } var index = [ -'', -'', -'', -'
', -'