phetsims / phet-vite-demo

Template/proof-of-concept of using Vite with PhET sources without the PhET toolchain
MIT License
1 stars 0 forks source link

phet-vite-demo

Testing out using Vite with PhET code. Uses the phet-lib NPM package.

Quick Start

(1) Clone phet-vite-demo:

git clone https://github.com/phetsims/phet-vite-demo.git

(2) Install dev dependencies:

cd phet-vite-demo
npm install

(3) Run it from a browser:

The following will run a server on your local machine, and you can navigate to the URL to see the demo.

npx vite serve

It will print out the URL to navigate to, e.g. http://localhost:5173/.

(4) Built it:

npx vite build

It will be built into the dist directory, where dist/index.html is the entry point. The dist directory can be moved/served from wherever.

(5) Lint it:

npx eslint .