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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search by script tag dependencies #11

Open
micahstubbs opened this issue Jun 17, 2016 · 4 comments
Open

search by script tag dependencies #11

micahstubbs opened this issue Jun 17, 2016 · 4 comments

Comments

@micahstubbs
Copy link
Collaborator

it would be cool to be able to search for blocks by what external libraries they import with script tags.

specifically, I would like to be able to search for blocks that only load d3, so that I can find an example of a technique implemented in pure d3 and javascript, without the overhead of some other charting library.

@mindrones
Copy link

mindrones commented Jun 22, 2016

It'd be nice to search by version, say:
/search#text=foo;libs=d3@3+topojson@1.6.19

@mindrones
Copy link

mindrones commented Jun 22, 2016

Also, it would be nice to use an operator to exclude a lib.

Say we use ! as a not:
/search#text=foo;libs=d3@3+backbone!react!ember

@enjalot
Copy link
Owner

enjalot commented Jun 28, 2016

getting the ball rolling: http://bl.ocks.org/enjalot/0c029c6295d1870050c89c75bed2bb6e
parsed with new code here: https://github.com/enjalot/blockbuilder-search-index/blob/master/parse.coffee#L230

@mindrones
Copy link

mindrones commented Jul 19, 2016

I see from #10 that you are now experimenting with cloning the gists: great!

Since @mbostock is updating his blocks to d3 v4 and many people will probably do the same, it would be super to be able to find v3, v4, vN of the same gist by keeping a reference to the last commit for a certain version, say:

{d3: {v3: '2n323ds', v4: 'd84hd67', ...}, backbone: {...}}

It might be expensive, but at least you need to do it just once for each gist and then keep it up to-date when future commits happen.

I'm thinking binary search may help to find out the version switch quickly and it can be enhanced by knowing the release dates: if d3 v4 has been released on a certain date it should be impossible to find it in commits happened before that release date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants