is there a way to use the globally installed moduled directly without declaring package.json and/or installing the modules in the current directory? i.e Just like a batch/shell job, running a small script with just a file itself..
Let me give you the context, in my job I keep getting various request like currently I am processing some file manually, I usually write script for these tasks comprising for few 10 to 20 lines to make things easy for me and save few hours. Though the script is probably never be gonna used again. To manage the dependent module, I either declare them in package.json or install locally one by one by using npm install <package-name>
. It will be very handy if I can achieve it with a single js file like a shell/batch script.
I guess this would be possible if somehow my script is able to refer a global modules.