Skip to content
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

Editor: Publish app as NPM package #28636

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

ycw
Copy link
Contributor

@ycw ycw commented Jun 12, 2024

Implements: #28187 (comment)

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)

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 14, 2024

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 #28187 (comment)).

@mrdoob Are you fine with this new style of published apps?

@Mugen87 Mugen87 added this to the r166 milestone Jun 20, 2024
@mrdoob mrdoob modified the milestones: r166, r167 Jun 28, 2024
@mrdoob mrdoob modified the milestones: r167, r168 Jul 25, 2024
@mrdoob mrdoob modified the milestones: r168, r169 Aug 30, 2024
@mrdoob mrdoob modified the milestones: r169, r170 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants