-
Notifications
You must be signed in to change notification settings - Fork 130
Add Crossdart links #856
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
Add Crossdart links #856
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
Cool! Can you add a command-line option to toggle this? |
Sure! |
lib/src/model.dart
Outdated
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.
we would like this to be https or relative (//www.crossdart
)
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.
Will do //www.crossdart
, thanks
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.
can you host crossdart on SSL?
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.
Sure, I host it on Google Cloud Storage (it's a static site), so I just need to buy SSL certificate, that's it.
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.
Unfortunately, google cloud storage doesn't allow for custom certs + custom DNS :(
You could put cloudfront in front.
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.
Oh really? Okay, I need to look into it then. Thanks for advice.
Okay, so, crossdart.info now supports HTTPS (https://crossdart.info). Unfortunately, I couldn't figure out how to make it work with CloudFront and GCS, so I moved everything to S3+CloudFront+Route53. Also, added a CLI flag to turn Crossdart on. @sethladd, PTAL. |
Hi! OK, we got our build in order and tests should be passing on our buildbots. Please take a moment to rebase and send up a new diff. Thanks! |
lib/src/cache.dart
Outdated
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.
Can you use a type annotation here? top-level variables should be typed. Thanks!
573ab0a
to
de1bffe
Compare
Rebased. It's weird - Travis CI complains that I have to run |
Travis is running |
What @devoncarew said. dartfmt changed its style between releases. Now that 1.12 is out, we'll turn on stable-channel testing again and everyone can and should be using 1.12's dartfmt. Sorry for the issues! |
Yup, just noticed, already upgrading our projects to Dart 1.12.0. Null-aware operators FTW! :) |
d1ef0ea
to
74c8aad
Compare
Okay, Travis is now green, I squashed everything into one commit, and ready to go! :) |
271830e
to
a911554
Compare
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.
Sorry I missed this before. Can you add some tests for this?
We don't need to test the generated HTML but it would be nice to test the output of calling element.documentation
and element.documentationAsHtml
with this option on and off.
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.
Makes sense, will add.
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.
Thanks. Apologies for not catching that before.
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.
No problem :) Added tests, PTAL.
bfc8265
to
617fd09
Compare
Nice! lgtm once we fix the failing test on windows. Actually, can you fix the test failing on windows?
|
Okay, let me try that. |
f38ebd1
to
9ffbfef
Compare
f41c916
to
46229a6
Compare
All green now, PTAL, @sethladd! |
Ping? :) |
Ack, sorry I missed this. Looks like you need to rebase. And then we'll merge it. |
Friendly ping. Care to rebase this so we can merge? Thanks! |
Added them to the _source_code partial, so every time we show the source code for something, it will have the Crossdart link. Also, added --add-crossdart cli option. Unfortunately, I couldn't find any global config entity in DartDoc, and passing addCrossdart bool through all the code down to SourceCodeMixin seems to be too dirty and awkward. So I created the Config class, which for now contains only one field (addCrossdart), and use that class in SourceCodeMixin to decide whether I should add crossdart url or not. The protocol and domain for crossdart link is '//', so it'd match the currently used protocol.
46229a6
to
904bf07
Compare
Rebased! Sorry for delay. |
Super cool, thanks! |
Added them to the _source_code partial, so every time we show the source code for something, it will have the Crossdart link.
/cc @sethladd