-
Notifications
You must be signed in to change notification settings - Fork 71
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
Grunt-like plugin listing #34
Comments
This idea has a lot of merit, jQuery recently moved to this approach, and customelements.io. To do this we'd need to make it a requirement that every plugin has To get a list of plugins on the website, we could either simply link to https://www.npmjs.com/browse/keyword/chai-plugin and allow users to browse npm for plugins. If we want to keep the plugins page, I cannot find any docs about an available npm registry api for retrieving JSON of packages by tag name - which could be a blocker for this - this may mean we have to manually download a cache of the registry and parse through it regularly (just like |
I managed to dig up an endpoint here which shows a list of npm packages that have the It doesn't fit our exact use case - if we are to maintain feature parity we'd ideally need to have the following:
For each plugin page (e.g. http://chaijs.com/plugins/chai-spies) we could probably get away with making a request to the individual package page (e.g. http://registry.npmjs.org/chai-spies) which has all of the necessary details. The other problem is that the URL does not support CORS - meaning any XHRs we make to it will fail, without a proxy layer. Maybe someone at @npm could help us with how to tackle this. |
Another option would be to have a script which fetches the npm search cache (https://registry.npmjs.org/-/all/since?stale=update_after&startkey=TIMESTAMP), and builds a The problem with this process would be the regularity of updates from which the |
Alternatively we could separate the plugin listing from the main website and host it on a subdomain (http://plugins.chaijs.com). That way we can have the main site as a gh-pages thing and the plugins run separately. If we dockerize the plugins app (or alternatively the whole thing), I can migrate it to my more reliable infrastructure, and automate the release of said assets on github webhooks. |
@logicalparadox while I'd certainly enjoy putting together a dockerized app, the beauty of having a fully static site and using gh-pages is that it's pretty much fire-and-forget, auto-releasing with virtually zero configuration, and maintainable by anyone of our contributors, regardless of server side experience. It also has the added benefit of being free at every scale, while using Heroku/Amazon/<insert host here> comes at some cost, which also means billing & bus factor concerns. I guess its a case of "spend a lot of time once to get it to work nicely as a static site" vs "spend a little bit of time regularly to maintain upkeep of server, billing, upgrades etc". |
As a task for doing this, we need all chai plugins to update their |
Made some significant process with this. All plugins have their contents fetched, and the script we have pulls in plugins from npm with the keyword _legacy_plugins exists which is just an enumeration of all of the plugins that /don't/ have the As per my previous comment - we need to go through each plugin listed in _legacy_plugins, and raise a PR to add the keyword to the package.json. |
See chaijs/chaijs.github.io#34 (comment) for more information.
@keithamus, added the keyword to my plugin \o/ (astorije/chai-immutable@39540ff). Comparing to the current solution, I have a few questions though:
Of course, most of these questions assume you are keeping a 1:1 functionality with the current look of the plugins, so maybe it's irrelevant :-) Thanks again and good luck on shipping this!! |
Yup this is correct. Seems like most (or even all) of the descriptions are fine for this purpose.
Personally, I think this is an acceptable compromise.
My plan is to filter out tags that are not relevant to us. So far this includes
Good question. I have been mulling this over and I'm not quite sure. Here are the options I've thought about:
P.S. support for
npm-plugin-fetcher supports blacklists - so if we need to we can blacklist modules from appearing on the plugins page. Its a low-key solution and hopefully we wont have to use it. I'd rather just have more stringent checks on a package.json - for example exclude packages that don't have a
While I'd like to keep a reasonable degree of parity, I think we'll definitely not end up being If you have any feedback on the above, I'd love to hear it. |
Going to settle on a package having the keywords of The following plugins need the following keywords added to their package.json files. Any one who reads this who wants to make PRs to these projects, I'd ask them to do so. As and when these are done, please let me know and I will tick them off of this list. If they are not done by the time the new website goes live, I'll try to get round to making PRs for the remainder, but it is important to know that the site will go live even if not every plugin has the requisite tags! Plugins
Note To Plugin AuthorsYou've been @mentioned because you have a chai plugin. Firstly thank you for being awesome! Secondly, sorry for the potentially unsolicited emails/notifications! Thirdly - in the above list - you'll find your plugin(s) and some keywords that I would like you to add to your package.json. You may also expect a PR adding these in from one of our contributors, or me if I get round to doing it before you. If you're wondering why I want you to add these keywords, here is the reasoning for each one:
If you edit your package.json, please drop me a note here so I can cross your plugin off of the list. Thank you for your time with this, it is much appreciated, and sorry if this caused you any inconvenience. |
Here we go https://www.npmjs.com/package/chai-xml |
👍 |
@krampstudio thanks for updating chai-xml. Feel free to hit the unsubscribe button on this thread - as it'll probably get pretty messy in here. If you have any free time and fancy making PRs for the other repos it'd be huuugely appreciated 😄 |
@keithamus keywords updates and published |
@johngeorgewright hi-hive ✋! Feel free to hit the unsubscribe button on this thread - as it'll probably get pretty messy in here. If you have any free time and fancy making PRs for the other repos it'd be huuugely appreciated 😄 |
@keithamus Chai-changes is updated, chai-backbone will be done later |
Thanks @matthijsgroen 😄. Let me know when you've done chai-backbone please. |
Awesome work here. 👍 |
Sweet, thanks @nathanboktae. FYI you might want to publish with the new keywords - chai-docs will read from the npm registry, not github. Actually same goes for chai-xml (@krampstudio), and chai-changes (@matthijsgroen) |
@keithamus -- Added keywords and published as |
@electricmonk I want to get the new site will be live before the end of the year, 3 weeks at most. Putting effort into updating the old site right now is not really worth it - part of the reason why we're rewriting the thing is because the old site is too much of a manual process, so to answer your question: unlikely. |
@keithamus fair enough :) |
chai-param updated! |
See chaijs/chaijs.github.io#34 for more.
See chaijs/chaijs.github.io#34 for more.
See chaijs/chaijs.github.io#34 for more.
See chaijs/chaijs.github.io#34 for more.
See chaijs/chaijs.github.io#34 for more.
See chaijs/chaijs.github.io#34 for more.
See chaijs/chaijs.github.io#34 for more.
See chaijs/chaijs.github.io#34 for more.
See chaijs/chaijs.github.io#34 for more.
Hey y'all who are still following this thread; we have a working plugin page on the github pages site: https://chaijs.github.io/chai-docs/plugins/. The keywords are clickable and filterable, and the tiles go to individual plugin pages - the README data is fetched from your README.mds, the keywords from your package.jsons. NOTICEThere are still a few outstanding packages - packages which do not include the |
Great work @keithamus! 👏 |
See chaijs/chaijs.github.io#34 for more.
I'm going to close this issue. The only outstanding plugins are the ones in chai core - which we will get around to as part of other refactoring and standardising work, and Chai Bookshelf (by @elliotf) which has an outstanding PR: elliotf/chai-bookshelf#1. I'd say we can consider this pretty well done. |
http://gruntjs.com/plugins
I think it's pretty neat and we'll stop forcing the people to submit a pull requests but fetch plugins automatically. I'll be doing the same for hydro.
@logicalparadox
The text was updated successfully, but these errors were encountered: