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

Prefetch plugin data from npm #81

Closed
wants to merge 1 commit into from
Closed

Conversation

keithamus
Copy link
Member

Hey @logicalparadox here's a quick attempt at getting plugins to be prefetched.

This uses npm-plugin-fetcher which is a quick script I wrote for this - which just pulls downs package.json files with the chai-plugin keyword in their package.json (actually, the files it pulls are more than just package.json - they include readme data and other bits, see https://registry.npmjs.org/chai-spies as an example).

These are all downloaded into ./out/plugins/ as JSON files. For now to keep this PR simple, I've just refactored the plugins server and added the prefetch command to the makefile. But future PRs could drop the server requirement and make the site a fully static-generated site.

If you demo this server you'll notice there is a somewhat limited list of plugins available on the plugins page - this is because not all plugins include the chai-plugin keyword. If you're happy with this PR then I can go and make PRs in all of the packages we have manually listed to add those keywords - alternatively as a quick hack for now, we can just add a bunch of curls to the plugins make task (or we could do a combination of both).

Also, whereas before plugins in our plugins.js needed to say browser:true or node:true - now they have to include the keywords chai-plugin-browser (browser:true) or chai-plugin-browser-only (browser:true,node:false). I figured this was a happy compromise with our existing list - although we lose out on informing visitors exactly how to use the files in browser, but I don't see this as much of an issue personally.

Oh, and this fixes #34

@keithamus
Copy link
Member Author

Closing this, as its now part of gh-pages.

@keithamus keithamus closed this Nov 9, 2015
@keithamus keithamus deleted the prefetch-plugin-data branch January 28, 2016 12:44
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.

Grunt-like plugin listing
1 participant