broccoli-node-api
    TypeScript icon, indicating that this package has built-in type declarations

    1.7.0 • Public • Published

    broccoli-node-api

    TypeScript types for the Broccoli Node Api

    Exports

    Node

    type Node = TransformNode | SourceNode;

    Node Documentation


    InputNode

    type InputNode = Node | string;

    NodeCommon

    interface NodeCommon<T extends NodeInfo> {
      __broccoliFeatures__: FeatureSet;
      __broccoliGetInfo__: (builderFeatures: FeatureSet) => T;
    }

    NodeMap

    interface NodeMap = {
      transform: TransformNode;
      source: SourceNode;
    };

    TransformNode

    interface TransformNode extends NodeCommon<TransformNodeInfo> {}

    SourceNode

    interface SourceNode extends NodeCommon<SourceNodeInfo> {}

    FeatureSet

    interface FeatureSet {
      [feature: string]: boolean;
    }

    NodeInfo

    type NodeInfo = TransformNodeInfo | SourceNodeInfo;

    NodeInfo Documentation


    NodeType

    type NodeType = "transform" | "source";

    NodeInfoMap

    interface NodeInfoMap = {
      transform: TransformNodeInfo;
      source: SourceNodeInfo;
    };

    NodeInfoCommon

    interface NodeInfoCommon<T extends NodeType> {
      nodeType: T;
      name: string;
      annotation: string | null | undefined;
      instantiationStack: string;
    }

    TransformNodeInfo

    interface TransformNodeInfo extends NodeInfoCommon<"transform"> {
      inputNodes: Node[];
      setup(
        features: FeatureSet,
        options: { inputPaths: string[]; outputPath: string; cachePath: string }
      ): void;
      getCallbackObject(): CallbackObject;
      persistentOutput: boolean;
      needsCache: boolean;
      volatile: boolean;
      trackInputChanges: boolean;
    }

    TransformNodeInfo Documentation


    CallbackObject

    interface CallbackObject {
      build(buildChangeObject?: BuildChangeObject): Promise<void> | void;
    }

    BuildChangeObject

    interface BuildChangeObject {
      changedNodes: boolean[];
    }

    SourceNodeInfo

    interface SourceNodeInfo extends NodeInfoCommon<"source"> {
      sourceDirectory: string;
      watched: boolean;
    }

    SourceNodeInfo Documentation

    Keywords

    none

    Install

    npm i broccoli-node-api

    DownloadsWeekly Downloads

    158,356

    Version

    1.7.0

    License

    MIT

    Unpacked Size

    11.7 kB

    Total Files

    4

    Last publish

    Collaborators

    • krisselden
    • rwjblue
    • stefanpenner
    • thoov