examples icon indicating copy to clipboard operation
examples copied to clipboard

Fix generate-readme script, refresh examples.json and README.md

Open domdomegg opened this issue 2 years ago • 3 comments

At a high-level, this fixes up the examples repository. Currently, both the npm run docs and npm run lint scripts don't even run.

⚡ This PR

  • Pushes down titles and descriptions into the package.json definitions, and generates examples.json from them. This allows npm run docs to run successfully.
  • Allows npm run lint to run (but it doesn't pass at the moment, given lots of examples have noncompliant code... but figured fixing all these was for another day)
  • Refreshes the README to get the latest updates to the community plugins / examples in this repo listed

⚠ Potentially breaking changes

  • Removing framework, authorLink, authorName, authorAvatar from examples.json. It isn't used in this repository, and I don't think any of them are necessary for the Serverless examples site but as it's not open-source AFAIK I'm unable to know for sure they're unused.

🔮 Future work

  • Upgrading global packages (e.g. eslint 5 -> 8, eslint-config-airbnb-base 10 -> 15, markdown-magic 0.1 -> 2)
  • Fixing all the eslint issues
  • Adding CI (maybe GitHub actions?) to make sure docs and lint scripts still work

domdomegg avatar May 25 '22 13:05 domdomegg

@pgrzesik / @mnapoli are you able to take a look at this PR, which puts this repository into much better health?

domdomegg avatar May 26 '22 13:05 domdomegg

Hello @domdomegg - sorry for late response. This is a massive change and we're currently in the process of rethinking how we should handle the examples repository. It also includes potential breaking changes and I'm not sure if we will have the bandwidth to properly evaluate the changes in the coming days.

What do you think @mnapoli ?

pgrzesik avatar May 27 '22 13:05 pgrzesik

Sorry for the delay, yeah this is a massive PR, I wouldn't be confident merging this, especially with how these files are used to generate pages on serverless.com

Maybe if this was all split in smaller pull requests it might be easier? Not sure though 😕

mnapoli avatar Jun 30 '22 15:06 mnapoli