Why use ‘lib’ vs ‘src’ directory names in JavaScript? Which is ‘standard’? [closed]

Interesting question, but it seems to me that some developers just take it by their own worldview.

It also depends on the project:

Some projects are built with smaller components, which are just little pieces of the main functionality: lib.

lib/independent-pieces.js

Other projects are monolithic, the components depend on each other: src.

src/this-is-all-for-this-project-and-depend-on-each-other.js

For third-party libraries, it’s common to use vendor.

vendor/bootstrap/
vendor/d3/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)