Beispiel #1
0
    def _instantiate_app(self, target_cls: Type[TargetV1], kwargs) -> TargetV1:
        """For App targets, convert BundleAdaptor to BundleProps."""
        parse_context = ParseContext(kwargs["address"].spec_path, dict())
        bundleprops_factory = Bundle(parse_context)
        kwargs["bundles"] = [
            bundleprops_factory.create_bundle_props(bundle)
            for bundle in kwargs["bundles"]
        ]

        return target_cls(build_graph=self, **kwargs)
Beispiel #2
0
  def _instantiate_app(self, target_cls, kwargs):
    """For App targets, convert BundleAdaptor to BundleProps."""
    parse_context = ParseContext(kwargs['address'].spec_path, dict())
    bundleprops_factory = Bundle(parse_context)
    kwargs['bundles'] = [
      bundleprops_factory.create_bundle_props(bundle)
      for bundle in kwargs['bundles']
    ]

    return target_cls(build_graph=self, **kwargs)
Beispiel #3
0
def _bundle(rel_path):
    pc = ParseContext(rel_path=rel_path, type_aliases={})
    return Bundle(pc)