Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 1.99 KB

scripts.md

File metadata and controls

29 lines (15 loc) · 1.99 KB

Content Scripts

This repo includes a few scripts to pull content from external sources, primarily the p5.js repo.

They are all runnable via npm scripts.

After a p5.js release

To update the content on the p5.js website following a new release of p5.js, you should run all of these commands to pull in the latest content. Be sure to run the search indices script last as it depends on the results of the other scripts to be accurate.

Contributor Docs Build Script

npm run build:contributor-docs copies the contributor docs from the p5.js repo and places them into the contributor docs content collection.

Reference Build Script

npm run build:reference parses the inline documentation in the p5.js source code (the JSDoc comments) and generates the pages in the reference collection. Because the directly inline documentation for p5.js is only in English, this script will only update the English translation of the reference.

Contributors List Build Script

npm run build:contributors parses the list of contributors from the all contributors config file in the p5.js repo and adds entries in the people collection for anyone who is missing. These are used to render the list of contributors on the People page. This script will not remove or update existing entries, that must be done manually.

Update p5 version Build Script

npm run build:p5-version reads the latest version of the p5.js library (for example, "2.19.3") and updates the website config to use that version of the library for embeds and download links across the site.

Search Indices Build Script

npm run build:search generates metadata about the content of the website so the search functionality can show relevant results. This script should usually be run after any of the above scripts are run.