JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Old version of rollup

    Scheduled Pinned Locked Moved General Discussions
    5 Posts 2 Posters 2.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • hpb-htwH Offline
      hpb-htw
      last edited by hpb-htw

      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 fuction render 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?
      1 Reply Last reply Reply Quote 0
      • z3devZ Offline
        z3dev
        last edited by z3dev

        @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.

        hpb-htwH 1 Reply Last reply Reply Quote 0
        • hpb-htwH Offline
          hpb-htw
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • hpb-htwH Offline
            hpb-htw @z3dev
            last edited by

            How about version policy? I see that in the branch V3 the main package.json has the version 2.0.0, some other packages have version 3.0.1-alpha.0. So if I correctly understand: each package should have a version of itself, shouldn't it?

            z3devZ 1 Reply Last reply Reply Quote 0
            • z3devZ Offline
              z3dev @hpb-htw
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              Powered by NodeBB | Contributors