bernhard-42 / three-cad-viewer

A CAD viewer component based on three.js
MIT License
158 stars 28 forks source link

publish on yarn registry #4

Closed roipoussiere closed 2 years ago

roipoussiere commented 2 years ago

Currently my VSCode extension attempt uses static files I manually download from the release page in this repository, and I don't want to commit them.

In order to correctly deal with the three-cad-viewer dependency, it could be appreciated to publish the package in the Yarn registry, as you did with jupyter_cadquery, and update it for each release. 🙂

bernhard-42 commented 2 years ago

Every release is published on the npm registry (https://www.npmjs.com/package/three-cad-viewer) and available via unpkg (https://unpkg.com/three-cad-viewer@1.5.5/dist/three-cad-viewer.js and https://unpkg.com/browse/three-cad-viewer@1.5.5/). Jupyter-Cadquery is published on yarn registry because the underlying framework of Jupyterlab does. yarn add three-cad-viewer@1.5.5 would install it in your dev environment.

Is there a reason why you need yarn registry? Would npm registry or unpkg work for you?

roipoussiere commented 2 years ago

My bad, I missed it, sorry! 😬

I though you had a preference for Yarn because of the presence of the yarn.lock in this repo (and in fact, it's already on the Yarn registry).

bernhard-42 commented 2 years ago

I do have a preference for yarn for development. I just have an already active npm account from the past, that's why I still publish to npm ...

roipoussiere commented 2 years ago

Ok! Btw I naively searched for "cadquery". Maybe if you add this term as keyword (eventually among some others) in npm / github it will facilitate the package discovery?

bernhard-42 commented 2 years ago

three-cad-viewer is completely independent of Juypter-CadQuery. You can use it with any tool the outputs tessellated 3D objects.

cad-viewer-widget uses three-cad-viewer and add an ipywidget layer on top of it. Just to be able to interact between Python and Javascript. Still, no CadQuery needed. In fact, one of the examples is built with pythonocc.

Finally, Jupyter-Cadquery transforms CadQuery objects into a format three-cad-viewer understands and uses cad-viewer-widget for communication between Python and Javascript.

That's why I didn't think of adding any cadquery tag ;-)