Is the cli package also included in the web version?
-
I posted a prompt suggesting the addition of some generative ai capabilities. In running the app locally I see that it is system linking the
@jscad/cliand@jscad/webpackages and running thepostInstall.jsscript, but then after successfully bootstrapping it's running thisdemo.jsscript.
My goal is to create a prompt input area in the editor.js section, but we will need a server side capabilities to keep the api key to which ever ai api we send the prompt commands to.
Fairly easy integration.
-
It's not node based, and just uses a minified compiled version of jscad.
<body> <noscript> <h1>Please enable JavaScript to use this website</h1> </noscript> <div id='jscad'></div> <script language="javascript" src="./dist/jscad-web.min.js"></script> <script language="javascript"> const el1 = document.getElementById('jscad') const jscadInst1 = jscadWeb(el1, {name: 'jscad1'}) </script> <script language="javascript"> window.addEventListener('beforeunload', (event) => { event.preventDefault() event.returnValue = '' }) </script> </body> -
-
@Jason-Sprouse what you installed was the WHOLE project, which requires NODEJS, NPM, etc. you will find the code for the CLI and the WEBUI. Once setup, you can change the code, run tests, add new functionality, etc. The packages are linked together.
The CLI can be installed directly from NPM. See the README for the CLI.
https://github.com/jscad/OpenJSCAD.org/tree/master/packages/cli
-
@z3dev The only reason I wanted the cli was node.js to access environment variables server side.
-
@Jason-Sprouse hmm...
The website doesn't have a backend service/process. Everything is handled by the browser, including loading designs.
The only trick is for designs provided an a URL parameter. In this case, the URL is posted to a little script that reads the contents, stores the file locally, and returns the URL to the local file.
Of course, some other backend service could be added.
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
