library_generate.ts view source
(input: LibraryGenerateInput): LibraryGenerateResult Generate library metadata from source files.
This is the main entry point for library generation. It analyzes source files, extracts metadata, and produces both structured data and file contents.
input
returns
LibraryGenerateResult examples
const result = library_generate({
source_files,
package_json: {name: '@my/lib', version: '1.0.0'},
source_options: module_create_source_options(process.cwd()),
});
await writeFile('library.json', result.json_content);
await writeFile('library.ts', result.ts_content);