lib
DirectoryAmong 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.
Write an email to opensource@sodaru.com