processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.1k stars 3.22k forks source link

[p5.js 2.0 RFC Proposal]: Build and test system update #7013

Open limzykenneth opened 1 month ago

limzykenneth commented 1 month ago

Increasing access

A modern and efficient build and test system significantly reduces the time and compute resource necessary to run build and tests of p5.js. Utilizing current best practice around JavaScript development also enables contributors to get familiar with JavaScript development through working on p5.js.

Which types of changes would be made?

Most appropriate sub-area of p5.js?

What's the problem?

Current build and test of p5.js has not seen significant updates for awhile and there are several issues that can be improved upon:

What's the solution?

The build system for p5.js will be updated to use Rollup, development server will use Vite, and the test runner will use Vitest.

Also see #6716 for some of the systems considered.

To do

In conjuction with refactoring and modularization, the build need to be updated as necessary.

The Vite development server can benefit from a more comprehensive index.html that includes common visual regression cases that contributors can check while they work on the code base.

The majority of pending work will be to update all tests to work with Vitest. The priority being all the existing unit tests. Visual tests may be added after.

Pros (updated based on community comments)

Cons (updated based on community comments)

Proposal status

Under review