Minified Javascript Runtime with dependencies included?

52 views
Skip to first unread message

Jarred Naicker

unread,
Aug 21, 2018, 5:02:45 AM8/21/18
to antlr-discussion

I currently make use of the npm package antlr4 in a node js project, with antlr4 parsers running in a web-worker, this works fine, however the npm package has its own dependencies such as:


"buffer": "github:jspm/nodelib...@0.1.1",
"fs": "github:jspm/nodel...@0.1.2",
"process": "github:jspm/nodelibs...@0.1.2"


The above dependencies have their own package dependencies and so forth. Performance on the web is crucial and I am trying to keep dependencies at a minimum. The less scripts our users need to download the better. (Our web app will be run on both desktop and mobile devices in slow network enviroments.)

I then decided to remove the node package in favour of the javascript runtime I download from antlr.org. This has its own node module requirements which are not available in the web-worker thread.


Surely there is a minified version of the javascript runtime I can use that does not require outside dependencies?

Mike Cargal

unread,
Aug 24, 2018, 6:53:08 PM8/24/18
to ANTLR List
We use Webpack to pull everything together into a single download.  I'm not sure you should expect much but the barest minimum javascript functionality to not have dependencies.  Using something like Webpack to bundle everything into a single downloadable *.js file should work well.

--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages