예제 #1
0
    def node_library(self, **kwargs) -> Path:
        # TODO: once we've migrated all Node.js repos to either having
        #  .repo-metadata.json, or excluding README.md, we can remove this.
        if not os.path.exists("./.repo-metadata.json"):
            self.excludes.append("README.md")
            if "samples/README.md" not in self.excludes:
                self.excludes.append("samples/README.md")

        kwargs["metadata"] = node.read_metadata()
        kwargs["publish_token"] = node.get_publish_token(kwargs["metadata"]["name"])
        return self._generic_library("node_library", **kwargs)
예제 #2
0
 def node_library(self, **kwargs) -> Path:
     kwargs["metadata"] = node.read_metadata()
     kwargs["publish_token"] = node.get_publish_token(
         kwargs["metadata"]["name"])
     return self._generic_library("node_library", **kwargs)
예제 #3
0
 def node_library(self, **kwargs) -> Path:
     kwargs["metadata"] = node.read_metadata()
     t = templates.TemplateGroup(_TEMPLATES_DIR / "node_library")
     result = t.render(**kwargs)
     _tracked_paths.add(result)
     return result