-
Notifications
You must be signed in to change notification settings - Fork 125
Refactor DartdocConfig option usage, part 4 of 4 #1676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
lib/src/model.dart
Outdated
|
||
Map<String, Map<String, dynamic>> __crossdartJson; | ||
// TODO(jcollins-g): move to [Package] | ||
Map<String, Map<String, dynamic>> get crossdartJson { | ||
if (__crossdartJson == null) { | ||
// TODO(jcollins-g): allow crossdart.json location to be configurable | ||
var crossdartFile = | ||
new File(pathLib.join(config.inputDir.path, "crossdart.json")); | ||
new File(pathLib.join(config.inputDir, "crossdart.json")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> 'crossdart.json'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
lib/src/model.dart
Outdated
@@ -5000,7 +5007,7 @@ abstract class SourceCodeMixin implements Documentable { | |||
} | |||
} else if (uri.startsWith("dart:")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
lib/src/model.dart
Outdated
@@ -5000,7 +5007,7 @@ abstract class SourceCodeMixin implements Documentable { | |||
} | |||
} else if (uri.startsWith("dart:")) { | |||
var packageName = "sdk"; | |||
var packageVersion = config.sdkVersion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
lib/src/model.dart
Outdated
} | ||
return _sdk; | ||
} | ||
|
||
EmbedderSdk _embedderSdk; | ||
EmbedderSdk get embedderSdk { | ||
if (_embedderSdk == null && packageMeta.isSdk == false) { | ||
if (_embedderSdk == null && config.packageMeta.isSdk == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!config.packageMeta.isSdk
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Fixes #1609. And finally, the payoff. Eliminate the old dartdoc config classes, seriously clean up
bin/dartdoc.dart
, define options a little more closely to where they are used, and make it at least not completely arcane to build your own generators in dartdoc extensions.This implements, but doesn't finalize #1674. I'm going to write a series of integration tests for each new option and promote them to supported once I'm convinced they work reliably from config files, but that's an awful lot to throw into this PR, too.