Files
wehub-resource-sync f73e710e38
Build site and push to gh-pages / Build site (push) Waiting to run
Build / build (push) Waiting to run
Linter / lint (push) Waiting to run
Security / dependency-review (push) Waiting to run
Security / npm-audit (push) Waiting to run
Security / codeql (push) Waiting to run
Tests / test (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 12:42:51 +08:00

36 lines
955 B
ReStructuredText

Building From Source
====================
Clone the Repository
---------------------
.. code-block:: bash
git clone https://github.com/mlc-ai/web-llm.git
cd web-llm
Install Dependencies
---------------------
.. code-block:: bash
npm install
Build the Project
-----------------
.. code-block:: bash
npm run build
Test Changes
------------
To test your changes, you can reuse an existing example or create a new example that specifically tests the new functionality you wish to provide.
To test the effects of your code change in an example, inside ``examples/<example>/package.json``, change ``"@mlc-ai/web-llm": "^0.2.xx"`` to ``"@mlc-ai/web-llm": "../.."`` to let it reference your local code. Note that sometimes you may need to switch between ``"file:../.."`` and ``"../.."`` to trigger npm to recognize new changes.
.. code-block:: bash
cd examples/<example>
# Modify package.json as described
npm install
npm start