MarshallOfSound / flora-colossus

Walk your node_modules folder
6 stars 9 forks source link

Optionally skip devDependencies #17

Closed thorsent closed 4 years ago

thorsent commented 4 years ago

When an electron application is delivered as an npm package rather than a repo, the devDependencies associated with that package will not be available. The tree walker throws an exception even though we likely were going to prune those devDependencies anyway inside electron-packager.

Now, the walker will skip devDependencies if the environment variable WALKER_IGNORE_DEV_DEPENDENCIES is set.

Note: it might be better if Walker accepted a constructor argument rather than an environment variable but that would require coordinated pull requests across flora-colossus, galactus and electron-packager. This might be MoS's preferred approach though.

MarshallOfSound commented 4 years ago

The tree walker throws an exception even though we likely were going to prune those devDependencies anyway inside electron-packager.

Can you clarify this, does it throw an error that it couldn't find a dependency? (It's been a while since I wrote this code)

thorsent commented 4 years ago

nvm, duh, I can just set prune=false when distributing as an npm package.,