TypeDoc API
    Preparing search index...

    Function compileFile

    • Compiles a single workflow file from the specified path. Supports TypeScript, JavaScript, and JSON files. If the file is TypeScript or JavaScript, it imports the module and executes the default export, which should be a function that returns a workflow definition, i.e. defineWorkflow. If the file is JSON, it reads the content and calls defineWorkflow on it. If the write option is enabled, also saves the compiled workflow to the specified output directory.

      Parameters

      • file: string

        The path to the workflow file to compile.

      • OptionaloutDir: string

        The directory where the compiled workflow will be saved.

      • write: boolean = true

        Whether to write the compiled workflow to the output directory. Defaults to true.

      Returns Promise<IWorkflowBase>

      A promise that resolves to the compiled workflow.

      If the file type is unsupported.