Closed mojavelinux closed 10 years ago
Here's the logic that should be used for parsing the attribute string:
Eventually, I want to make attribute parsing a public API in AsciidoctorJ (and subsequently, Asciidoctor).
I also like processorArgs
or argLine
instead of additionalparam
for the name of the configuration property.
I'm okay with additionalProcessorArgs
too.
On further thought, perhaps it's better for the attributes to support a collection called attributes
to be consistent with the Maven plugin. See this example: https://github.com/mojavelinux/asciidoctor-maven-plugin-example/blob/master/pom.xml#L111
In general, I think we should try to align with the Maven plugin where possible since, again, it reenforces knowledge. There's a very good chance users will be configuring both plugins in the same project.
Where alignment is not possible due to restrictions in how the tool is configured, I understand.
I now see that Doclet uses the convention of single hyphen prefixes (order me a beer and I could do a rant about engineers at a Unix company not following the posix conventions...argh).
I think for options that clearly map to Asciidoctor options, we should use the double hyphen. However, I realize that we might not be able to do anything about the -d
flag. Water over the damn.
+1 for consolidating/defining parameters and their appropriate argument names in a common library like Asciidoctorj.
I'd like to align the option names that go in
additionalparam
with theasciidoctor
command.I'm proposing the following changes.
--
) instead of single dash (-
) prefix for long option names-a
options)The mapping would be as follows:
-include-basedir
=>--base-dir
or-B
-d
=>--destination-dir
or-D
-stylesheetsfile
=>--stylesheet
(file is assumed)-attributes
=>--attributes
We want to reenforce knowledge of AsciiDoc option across the ecosystem.