Otherwise library items that depend on magical pieces that use these
templates (eg, dice) don't work correctly.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
libraries: $(LIBRARY_FILES)
-templates/shapelib.html: $(TARGET_DIR)/debug/otterlib $(LIBRARY_FILES)
+templates/shapelib.html: $(TARGET_DIR)/debug/otterlib $(LIBRARY_FILES) \
+ $(NWTEMPLATEASSETS)
$(NAILING_CARGO_JUST_RUN) $(abspath $<) \
+ --nwtemplates $(abspath nwtemplates) \
--libs '$(addprefix $(PWD)/, $(addsuffix .toml, $(LIBRARIES)))' \
preview >$@.tmp && mv -f $@.tmp $@
#[derive(Debug,Clone)]
#[derive(StructOpt)]
pub struct Opts {
+ #[structopt(long="--nwtemplates", default_value="./nwtemplates")]
+ nwtemplates: String,
+
#[structopt(long="--libs", default_value="library/*.toml")]
libs: String,
const SEVERAL: usize = 3;
let ig_dummy = Instance::dummy();
+ nwtemplates::init_from_dir(&opts.nwtemplates)?;
+
impl Prep {
fn want_several(&self) -> bool {
self.size[0] < 50.0