main logic for component's build command