chore(docgen): Use updated dartdoc tool
Use the new `dartdoc` tool, which [shipped with 1.12](https://groups.google.com/a/dartlang.org/forum/#!topic/announce/Q1JSlVaFFnY) Update the sdk constraint to 1.12
This commit is contained in:
parent
9619636ba7
commit
0f54ed0306
|
@ -1,6 +1,6 @@
|
||||||
name: angular
|
name: angular
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=1.9.0 <2.0.0'
|
sdk: '>=1.12.0 <2.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
observe: '0.13.1'
|
observe: '0.13.1'
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
|
@ -8,7 +8,7 @@ module.exports.detect = function(gulp) {
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
DART_SDK = {
|
DART_SDK = {
|
||||||
ANALYZER: 'dartanalyzer.bat',
|
ANALYZER: 'dartanalyzer.bat',
|
||||||
DARTDOCGEN: 'dartdocgen.bat',
|
DARTDOCGEN: 'dartdoc.bat',
|
||||||
DARTFMT: 'dartfmt.bat',
|
DARTFMT: 'dartfmt.bat',
|
||||||
PUB: 'pub.bat',
|
PUB: 'pub.bat',
|
||||||
VM: 'dart.exe'
|
VM: 'dart.exe'
|
||||||
|
@ -16,7 +16,7 @@ module.exports.detect = function(gulp) {
|
||||||
} else {
|
} else {
|
||||||
DART_SDK = {
|
DART_SDK = {
|
||||||
ANALYZER: 'dartanalyzer',
|
ANALYZER: 'dartanalyzer',
|
||||||
DARTDOCGEN: 'dartdocgen',
|
DARTDOCGEN: 'dartdoc',
|
||||||
DARTFMT: 'dartfmt',
|
DARTFMT: 'dartfmt',
|
||||||
PUB: 'pub',
|
PUB: 'pub',
|
||||||
VM: 'dart'
|
VM: 'dart'
|
||||||
|
|
|
@ -19,23 +19,23 @@ module.exports = function(gulp, plugins, config) {
|
||||||
if (supportedModules.indexOf(dir) === -1) {
|
if (supportedModules.indexOf(dir) === -1) {
|
||||||
done();
|
done();
|
||||||
} else {
|
} else {
|
||||||
console.log('INFO: running dartdocgen for ', dir);
|
console.log('INFO: running dartdoc for ', dir);
|
||||||
|
|
||||||
var stream = spawn(config.command, ['.'], {
|
var stream = spawn(config.command, ['--input=.'], {
|
||||||
stdio: [process.stdin, process.stdout, process.stderr],
|
stdio: [process.stdin, process.stdout, process.stderr],
|
||||||
cwd: dir
|
cwd: dir
|
||||||
});
|
});
|
||||||
|
|
||||||
stream.on('exit', function(code) {
|
stream.on('exit', function(code) {
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
done('ERROR: dartdocgen exited with non-zero status ' + code);
|
done('ERROR: dartdoc exited with non-zero status ' + code);
|
||||||
} else {
|
} else {
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
stream.on('error', function(e) {
|
stream.on('error', function(e) {
|
||||||
done('ERROR: dartdocgen reported error: ' + e);
|
done('ERROR: dartdoc reported error: ' + e);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return defer.promise;
|
return defer.promise;
|
||||||
|
|
Loading…
Reference in New Issue