-1

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 ?

Hugolpz
  • 16,007
  • 25
  • 91
  • 183

1 Answers1

0

Yes, edit youtube-dl/lib/youtube-dl.js. A console.log('hello world') there can proves you that it is the right file to edit. I have no idea what is the youtube-dl/bin/youtube-dl about.

Hugolpz
  • 16,007
  • 25
  • 91
  • 183