diff --git a/gulpfile.js b/gulpfile.js index 1b39e282a8..b979007a35 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -25,6 +25,7 @@ var pubget = require('./tools/build/pubget'); var linknodemodules = require('./tools/build/linknodemodules'); var pubbuild = require('./tools/build/pubbuild'); var dartanalyzer = require('./tools/build/dartanalyzer'); +var dartapidocs = require('./tools/build/dartapidocs'); var jsserve = require('./tools/build/jsserve'); var pubserve = require('./tools/build/pubserve'); var karma = require('karma'); @@ -250,6 +251,11 @@ gulp.task('build/analyze.ddc.dart', dartanalyzer(gulp, gulpPlugins, { use_ddc: true })); +gulp.task('build/check.apidocs.dart', dartapidocs(gulp, gulpPlugins, { + dest: CONFIG.dest.dart, + command: DART_SDK.DARTDOCGEN +})); + // ------------ // pubbuild // WARNING: this task is very slow (~15m as of July 2015) @@ -843,6 +849,7 @@ gulp.task('build.dart', function(done) { 'build/packages.dart', 'build/pubspec.dart', 'build/analyze.dart', + 'build/check.apidocs.dart', 'build.dart.material.css', sequenceComplete(done) ); diff --git a/modules/angular2/core.ts b/modules/angular2/core.ts index efbb7ddd13..4ac6b3f0a7 100644 --- a/modules/angular2/core.ts +++ b/modules/angular2/core.ts @@ -23,7 +23,6 @@ export {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle'; export {ElementRef} from 'angular2/src/core/compiler/element_ref'; export {TemplateRef} from 'angular2/src/core/compiler/template_ref'; -export {RenderElementRef} from 'angular2/src/render/api'; export {ViewRef, HostViewRef, ProtoViewRef} from 'angular2/src/core/compiler/view_ref'; export {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref'; export {ComponentRef} from 'angular2/src/core/compiler/dynamic_component_loader'; diff --git a/modules/angular2/src/test_lib/spies.dart b/modules/angular2/src/test_lib/spies.dart index 893fac9fc6..d0836acd8f 100644 --- a/modules/angular2/src/test_lib/spies.dart +++ b/modules/angular2/src/test_lib/spies.dart @@ -4,27 +4,27 @@ import 'package:angular2/src/change_detection/change_detection.dart'; import 'package:angular2/di.dart'; import './test_lib.dart'; -@proxy() +@proxy class SpyChangeDetector extends SpyObject implements ChangeDetector { noSuchMethod(m) => super.noSuchMethod(m); } -@proxy() +@proxy class SpyProtoChangeDetector extends SpyObject implements ProtoChangeDetector { noSuchMethod(m) => super.noSuchMethod(m); } -@proxy() +@proxy class SpyPipe extends SpyObject implements Pipe { noSuchMethod(m) => super.noSuchMethod(m); } -@proxy() +@proxy class SpyDependencyProvider extends SpyObject implements DependencyProvider { noSuchMethod(m) => super.noSuchMethod(m); } -@proxy() +@proxy class SpyChangeDetectorRef extends SpyObject implements ChangeDetectorRef { noSuchMethod(m) => super.noSuchMethod(m); } diff --git a/tools/build/dart.js b/tools/build/dart.js index 7fe991809e..923f9ef1b1 100644 --- a/tools/build/dart.js +++ b/tools/build/dart.js @@ -8,6 +8,7 @@ module.exports.detect = function(gulp) { if (process.platform === 'win32') { DART_SDK = { ANALYZER: 'dartanalyzer.bat', + DARTDOCGEN: 'dartdocgen.bat', DARTFMT: 'dartfmt.bat', PUB: 'pub.bat', VM: 'dart.exe' @@ -15,6 +16,7 @@ module.exports.detect = function(gulp) { } else { DART_SDK = { ANALYZER: 'dartanalyzer', + DARTDOCGEN: 'dartdocgen', DARTFMT: 'dartfmt', PUB: 'pub', VM: 'dart' diff --git a/tools/build/dartapidocs.js b/tools/build/dartapidocs.js new file mode 100644 index 0000000000..5efa4172c6 --- /dev/null +++ b/tools/build/dartapidocs.js @@ -0,0 +1,44 @@ +var Q = require('q'); +var readline = require('readline'); +var spawn = require('child_process').spawn; +var util = require('./util'); + +module.exports = function(gulp, plugins, config) { + return function() { + return util.forEachSubDirSequential(config.dest, function(dir) { + var defer = Q.defer(); + var done = defer.makeNodeResolver(); + + var supportedModules = [ + 'dist/dart/angular2', + // TODO: blocked by https://github.com/angular/angular/issues/3518 + // 'dist/dart/angular2_material', + 'dist/dart/benchpress' + ]; + + if (supportedModules.indexOf(dir) === -1) { + done(); + } else { + console.log('INFO: running dartdocgen for ', dir); + + var stream = spawn(config.command, ['.'], { + stdio: [process.stdin, process.stdout, process.stderr], + cwd: dir + }); + + stream.on('exit', function(code) { + if (code !== 0) { + done('ERROR: dartdocgen exited with non-zero status ' + code); + } else { + done(); + } + }); + + stream.on('error', function(e) { + done('ERROR: dartdocgen reported error: ' + e); + }); + } + return defer.promise; + }); + }; +};