code: protected void resource(String template, String packageName, String resourceName, Supplier<Map<String, Object>> context) {
          StringBuffer code = generate(template, context);
          writeResource(packageName, resourceName, code);
      }
docs: Generates and writes a resource in one call.
  
  @param template     the relative template name (w/o path or package name)
  @param packageName  the package name
  @param resourceName the resource name
  @param context      a function to create the templates' context