-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
While it is possible to have several route and compile commands, only one preprocess command is permitted. That has become a problem for my project which has two distinct parts. Each has a separate section in the Rules file with its own set of route and compile commands. However, I cannot achieve a clean separation of the preprocessing steps. The best I have managed is
preprocess_A = proc { |obj|
obj.instance_exec() {
# code for preprocessing A-related items
}
}
preprocess_B = proc { |obj|
obj.instance_exec() {
# code for preprocessing B-related items
}
}
preprocess do
preprocess_A.call(self)
preprocess_B.call(self)
endPossible fixes (in order of descending desirability):
- Add support for multiple
preprocesscommands. - Add documentation to https://nanoc.app/doc/troubleshooting/ or to https://nanoc.app/doc/rules/#preprocessing explaining how to achieve this functionality (kludge above or something better).
- Fix the typo in the warning message in
compiler_dsl.rb: it should say "another postprocess block overrides the previously SUPPLIED one".
Finally, let me express great thanks for the wonderful tool! I have used nanoc for years, and was silent about it only because it has been doing everything I needed so well that I did not need to say anything :-)
Metadata
Metadata
Assignees
Labels
No labels