Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to integrate with angular electron app? #102

Open
Bliu00 opened this issue Feb 3, 2022 · 1 comment
Open

How to integrate with angular electron app? #102

Bliu00 opened this issue Feb 3, 2022 · 1 comment

Comments

@Bliu00
Copy link

Bliu00 commented Feb 3, 2022

I have an offline angular electron desktop app and I'm trying to connect your nesting tool to it but I can't seem to get it working.

Note:

  • The project must be working while not connected to the internet

We tried to import all the javascript files into our angular project and change the syntax a bit so it would work with angular. I.E adding export, import, and require to add all the modules and files. This worked for the main svgnest.js but failed when going deeper into the functions of the util modules. More specifically the parallel.js, workers, and eval.js files are giving me trouble and parallel would fail when I attempt to use the .require function. It would either error out saying it cant find a specific path "localhost:4200/[path to module]" or say it cannot use importScript for the specific path.

"Uncaught SyntaxError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The URL 'matrix.js' is invalid."
or
"GET http://localhost:4200/util/eval.js 404 (Not Found)"

I'm also confused as to how the util files determine whether or not it is using nodeJS. I've noticed a isNode var a few times in the utils that would be false when I am using node so I don't know if I'm integrating properly.

Do you happen to know how to fix these errors or issues?

@dorkmo
Copy link

dorkmo commented Feb 5, 2022

i believe it will try to send the files to a server for conversion. does to act any different when connected to internet? You might try one of the software forks on github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants