ew-auto-import-tool provides a series of core APIs that can be used programmatically in your projects. Below are the main API functions and their usage.
The main function for executing the entire auto-import configuration process.
library
: The component library to configure, type Library
(string literal type)projectPath
: Project path, defaults to the current working directoryPromise<boolean>
: Promise indicating whether the configuration was successfulIn addition to the main function, ew-auto-import-tool also provides several module APIs that can be used independently:
These modules can be imported and used separately according to your needs.