Old version of rollup
-
Why does JSCAD use the very old version of rollup? By runing
for pf in `find -name 'package.json' | grep -v node_modules`; do echo $pf; grep 'rollup' $pf ; done
I get the version 2.79.1. I don't have problem with old version of a software, as long as it works and I can find the document of the old version.
Let me explain the background why I need to use rollup.
I want to extend the document with embedded running examples. So I make a small static JS-file to use it in each JSDoc generated HTML-files to display example. This static JS file should import the same JS modules in the repository, show I can automatically keep it consistent with versions of JSCAD:// filename web-render.es.js import { cameras, commands, controls, entitiesFromSolids, prepareRender } from "@jscad/regl-renderer" export const render = (shapes, domId) => { // .... Do something here }
This file is then converted into
web-render.js
, which exposes the fuctionrender
into global scope, and can be easily used as<script src="web-render"></script> <!-- some where in the doc: --> <div id="sphere-demo"></div> <script> render(model, "sphere-demo") </script>
My questions:
- Why JSCAD does use the old version of rollup?
- Where can I find the old document of the used rollup version?
- If the document does not exist anymore, how much effort does it take to port the old version to the new of rollup?
-
@hpb-htw Super! You understand well.
Each package will have a slightly different version, as Lerna determines major/minor/fix versions by changes. The main package is never released so, the version stays the same, but should be 3.0.0.
Please take another look at utils/regl-renderer package. The demo html files are slightly different in V3.
-
How about version policy? I see that in the branch V3 the main
package.json
has the version2.0.0
, some other packages have version3.0.1-alpha.0
. So if I correctly understand: each package should have a version of itself, shouldn't it? -
This post is deleted! -
@hpb-htw V2 uses Lerna to manage each package, including building and publishing the distributions to NPM. See the link in the main README.
As part of the build process. Lerna calls the build step of each package. This step uses browserify.
If you switch to the V3 branch then you will find that The build step is using rollup.
So, be careful. Don't mix the versions.
By the way, the CONTRIBUTING document explains how to setup, make changes, test changes, and submit changes back to GIT. Please follow the document.