I'm looking at this javascript library:
https://github.com/segmentio/analytics.js
And near the button in has statements like:
require.alias("component-cookie/index.js", "analytics/deps/cookie/index.js");
require.alias("component-cookie/index.js", "cookie/index.js");
The docs say that:
We've already packaged the files as a standalone build found in analytics.js and analytics.min.js. To build the files yourself, run make.
Does this mean you don't need nodejs to build this? Or are these nodejs specific commands?
Nope, no need for node.js to use those files. The require object you see being used there is actually from component which is a package manager for the frontend. It's like npm for the browser basically, and plays nicely with node.js as well.
So long story short, you can just throw those files on the page and you're good to go.