Streamline Package Development With Bun Link
Use bun link to debug local libraries and blog themes without repeatedly publishing and reinstalling packages.
Bun Link
- Run
bun linkin the library project directory to register the library as a globally linkable package. - In the project that needs to use the library, run
bun link {package-name}to link that local library into the project. - After that, the project can use the library directly, and changes made inside the library project will be reflected in the project in real time.
$ cd ~/Projects/hexo-dev/hexo-shiki-highlight$ bun link$ bun link v1.3.3 (274e01c7)Success! Registered "hexo-shiki-highlight"To use hexo-shiki-highlight in a project, run: bun link hexo-shiki-highlightOr add it in dependencies in your package.json file: "hexo-shiki-highlight": "link:hexo-shiki-highlight"$ cd ~/Projects/vluv$ bun link hexo-shiki-highlightbun link v1.3.3 (274e01c7)installed hexo-shiki-highlight@link:hexo-shiki-highlight1 package installed [47.00ms]