Background
I am working on a Django app and need to create an admin widget. The widget will display text in a unique terminal-style format to show forwarded logs from an analytics process managed by Django (using the django-twined extension).
To achieve this, I plan to utilize a library like terminal-kit or similar that requires npm installation.
Developing the App
Since the app is Docker-based, I want to avoid including the entire node stack in my production image.
One approach could be using a multi-stage docker build, where I install node and necessary libs from NPM in the first stage, then copy the libraries from `node_modules` in the second stage. However, I find this method somewhat slow.
Moreover, as I only intend to use the raw js static assets bundled with the Django app, I'm not sure how to import the module (if possible at all).
The Inquiries
Is it feasible to install an npm module without having the complete node stack, hence avoiding complex multi-stage builds?
How can I then effectively `import` or `require` the module's contents into vanilla JavaScript for utilization in a Django widget?
Overall, is this task achievable? If it seems overly complicated, I may resort to a simpler solution like using a text area with monospace font... yet, I would prefer log highlighting and colors to be accurately displayed in a terminal-like format.