The furoc
"compiler" is a generator tool similar to protoc
.
- The furo specs can translate to *.proto and vice versa. When you already have protoc plugins, use them.
- The furo specs have a much higher information density then the proto specs have. For generating ui components with furoc-gen-u33e, proto is not enough.
- Furoc does not stop on an incomplete import chain. If you need this, use protoc before furoc.
- Using furoc and protoc in combination gives you a lot of advantages, furoc plugins are easier to write,...
You can configure the arguments in your .spectools file or give the arguments in the cli.
As soon you pass a Sxxx or Fxxx argument, only these will be built. To generate everything, do not pass a Sxxx or Txxx argument.
This command will generate only service:reference-search
, type:form
and service:collection-dropdown
components
furoc
-I./pathTto/spec/project
--plugin=furoc-gen-u33e
--u33e_out=
Sreference-search,\
Tform,\
Scollection-dropdown,\
:outputDirectoryForGenU33e
Same rules from "run as command" are applied.
Furoc will look for a .furoc
file in the current directory.
furoc
Example .furoc file:
furoc:
Input:
- ./
Commands:
- OutputDir: dist/u33e
Plugin: furoc-gen-u33e
Args:
- Sreference-search
- Tform
- Scollection-dropdown
Defines the spec projects to include. At the moment only one spec project include is supported.
Defines the binary to use. If you do not use this option, the binary in $PATH
will be used.
Defines which plugins furoc should use.
pluginname_out
will translate to furo-gen-pluginnamearg1,arg2,argN
will be passed as arguments for the plugin. Read on the documentation of the plugin which arguments are valid.:outputdir
the generated files from the plugin will written to this directory
It is not so difficult to write a plugin for furoc. Look at the sample furoc-gen-sample
or look at other plugins.
Furoc will pass a yaml with the current config of the spec project, the types, the services, the installed types and the installed services. As an example input for your plugin, look at sample/fullyaml.yaml.
The list will go to stdin
of your plugin.
Furoc exects a list of files as response. The response goes to stdout
of your plugin.
You can use the package reqres which handles all the stdin stdout encoding decoding stuff for you.
At the moment, only serialized go structs are accepted as response. A variant which accepts proto (with the same interface protoc excepts the responses) will come; if requested.