Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caniuse.rs integration #77

Merged
merged 2 commits into from
Oct 5, 2020
Merged

Add caniuse.rs integration #77

merged 2 commits into from
Oct 5, 2020

Conversation

aquarhead
Copy link
Contributor

@aquarhead aquarhead commented Oct 2, 2020

First of all I want to say a huge thank you for this extension, it has very much integrated to my workflow when working with Rust (sadly not much if any at work yet). While scanning the issues I'm particularly interested in #22 and this is my attempt at it.

It took me a while to figure out how the data is imported, and my plan is to have a Rust binary to load the data from a local path. As I understand caniuse.rs does not provide "API" to fetch all data so the most reliable way I can think of is to import data directly from their repo. This can be easily integrated into the build pipeline as well, I believe, as we'll only need to add an additional git clone before running the Rust binary. Another option is to include it as a submodule, but I'm not sure that makes sense for this project.

I included a small sample of index data and I would like to know if you have any feedback on the layout and the above approach regarding fetching the data (before I further commit to implement them). (And of course on everything else, I'm beginner at JS without much intent to be proficient with it 馃槃 )

It currently works like this:

image

image

The first will redirect to caniuse.rs and the latter will redirect to the RFC (it also excludes those without RFCs)

Copy link
Member

@Folyd Folyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR, thanks a lot! I haven't checked caniuse.rs source code and its index. I think integrating the index file to our extension is ok.

Or if you think we should update the index periodically, we can write some rust codes to do this (see https://github.com/huhu/rust-search-extension/tree/master/rust/src/bin). I'll add it to the Github workflow.

extension/main.js Outdated Show resolved Hide resolved
extension/main.js Outdated Show resolved Hide resolved
extension/search/caniuse.js Show resolved Hide resolved
@aquarhead
Copy link
Contributor Author

Yeah we should update the index periodically, I'll work on the Rust code and GitHub Actions workflow :)

@aquarhead aquarhead marked this pull request as draft October 5, 2020 10:45
@Folyd Folyd marked this pull request as ready for review October 5, 2020 12:23
@Folyd Folyd merged commit 9e69172 into huhu:master Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants