This is a sub-project and it can't run on its own. It needs to be integrated into the main project
Make the main project link to this sub-project
# cd <this project>
cd <your-sub-project-dir>
pnpm install
pnpm build
pnpm link --dir <your-main-project-dir>
# example: pnpm link --dir ../parax
Once the sub-project is linked, you can run the main project to see the changes.
Note: You need to run
pnpm build
every time you make changes to the sub-project
cd <your-main-project-dir>
pnpm unlink <your-sub-project-dir>
# example: pnpm unlink ../parax-bridge
# or
cd <your-sub-project-dir>
pnpm unlink --dir <your-main-project-dir>
# example: pnpm unlink --dir ../parax
Publish as a npm package (e.g. parax-bridge
), and install it in the main project
pnpm add parax-bridge
and then,
import bridgeApp from 'parax-bridge';
import { AppPackage } from 'parax-sdk';
const bridgeAppPKG: AppPackage = { ...bridgeApp, icon: `design/logo/${bridgeApp.icon}` };