Editor: Publish app as NPM package
Implements: https://github.com/mrdoob/three.js/pull/28187#issuecomment-2107022036
With this PR, SETTINGS:APP:PUBLISH now emits app as NPM package with the following structure:
public/
app.json
src/
app.js
index.html
package.json
The package has two dependencies: three and vite, installs them via $ npm i
To play: $ npm run dev
To build: $ npm run build
To host on ghpage: adds vite.config.js to config base, ex. repo (its ghpage)
I've downloaded your branch today and tested locally. It works great!
The motivation behind this PR is to produce published apps that are closer to our Installation guide. Meaning apps are using now the three npm package and host the application with a local server (in this case vite).
This should also make it easier to integrate addons like RectAreaLight or TextGeometry into published apps (see https://github.com/mrdoob/three.js/pull/28187#issuecomment-2107022036).
@mrdoob Are you fine with this new style of published apps?