SOMOD's lib Directory


Among all directories in SOMOD, lib is the simplest one. The Developer can write the reusable code in the lib directory. The build command compiles typescript in the lib directory into build/lib, generating javascript and type definitions.

As discussed in the package.json structure, the module property has a "build/lib/index.js" value. So the code exported from "lib/index.ts" is available for other modules to import.

project-root | +-- build/ | +-- lib/ | +-- other.js | +-- index.js <-------+ | ^ | | | | | 'BUILD' 'module in package.json refers to this' +-- lib/ | | | +-- other.ts | | | +-- index.ts ---+ | | | +-- package.json -----------------+

In the next section, let's explore what our serverless directory contains.

Does this page need improvements?
Edit This Page in GitHub
Did this page help you?
Provide feedback in the GitHub Discussion Page
Need More help?

Write an email to opensource@sodaru.com

This documentation is built using
Developed and Maintained By
Sodaru Technologies
https://sodaru.com
© 2023