This directory contains the TypeScript source code for the LuCI PortWeaver UI.
components/ # UI component modules
modules/ # Business logic modules
types/ # TypeScript type definitions
utils/ # Utility functions
main.tsx # Main entry point
This package is managed from the project root directory. Run dependency installation in the project root:
pnpm installpnpm dev- Copy
.env.exampleto.envand configure SSH settings:
cp .env.example .env- Edit
.env:
SSH_HOST=192.168.1.1
SSH_PORT=22
SSH_USERNAME=root
SSH_PASSWORD=your_password
# Or use SSH key: SSH_PRIVATE_KEY_PATH=~/.ssh/id_rsa
SSH_REMOTE_PATH=/www/luci-static/resources/view/portweaver- Start remote development:
pnpm dev:remoteThis will auto-compile and upload changes to your OpenWrt device.
pnpm buildThe TypeScript code will be compiled and bundled into:
./package/luci-app-portweaver/htdocs/luci-static/resources/view/portweaver/config.js
This file is what gets packaged into the final IPK.
- The source files (such as
main.tsx,components/,modules/) are NOT included in the IPK package - Only the compiled output in
package/luci-app-portweaver/htdocs/is packaged - Keep LuCI API compatibility when refactoring