Most of the time, when I look at projects in github , I see lib/ directory.
I just googled if there is a conventional meaning of lib/ directory. But I couldn't find much.
I would like to know what lib/ directory is for just to choose where to start looking at in github projects.
Project which have lib/ directories.
orchestrator
gulp
The lib folder is a library files directory which contains all helpful library files used by the system. In simple terms, these are helpful files which are used by an application or a command or a process for their proper execution. The commands in /bin or /sbin dynamic library files are located just in this directory.
The /lib directory contains kernel modules and those shared library images (the C programming code library) needed to boot the system and run the commands in the root filesystem, ie. by binaries in /bin and /sbin. Libraries are readily identifiable through their filename extension of *. so.
The lib folder is what package. json main points to, and users that install your package using npm will consume that directly.
Directories. lib/ is intended for code that can run as-is. src/ is intended for code that needs to be manipulated before it can be used. build/ is for any scripts or tooling needed to build your project. dist/ is for compiled modules that can be used with other systems.
The lib
directory, for most of my projects, is where I place shared components that might be used in multiple facets of my application. Things in this folder should not be tightly coupled to your application, and should theoretically be able to be plucked from one project to another, and work as expected (assuming all dependencies are available). Some examples of things I put in my lib
folders:
lib
folder. It is just functional, and not bound to any of my application code or DOM structure.lib
just outlines how my component works, but doesn't implement any application-specific functionality. I can then include this in my core application and use it as if it were a third party library.Essentially, anything that could be a third party dependency that you don't want to place in it's own repository and set up management for, you can use lib
and have that functionality cleanly decoupled within your primary app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With