I have a nodejs project. Within this project, I installed a package via npm install youtube-dl --save
. So, I not got a ./SuperProject/node_modules/youtube-dl/
directory, whom content is something such as :
|-/bin
+- youtube-dl <--- what is that thing ?
|-/example
|-/lib
+- youtube-dl.js <--- core code and executable ... i guess
|-/scripts
|-/test
|-LICENSE
|-package.json
|-README.md
I inspect around, and I see that I could edit ./node_modules/youtube-dl/lib/youtube-dl.js
, by adding one condition to this package's main file :
if (options.format) {
args.push('--sub-format=' + options.format);
}
I instinctively and boldly add this lines to ./node_mudules/youtube-dl/lib/youtube-dl.js
.
Back to root, I relaunch my script :
cd ../../SuperProject
node superproject.js
I see no change in my output. Was I right to edit ./node_modules/youtube-dl/lib/youtube-dl.js
? Or is ./node_modules/youtube-dl/bin/youtube-dl
the real deal to edit ?