PLUGIN_DIR = plugins/read_file
PLUGIN_TARGET = wasm32-unknown-unknown
PLUGIN_OUTPUT = $(PLUGIN_DIR)/target/$(PLUGIN_TARGET)/release/plugin.wasm
all: build
.PHONY: build
build:
cargo build --release
.PHONY: plugin
plugin:
cargo build --release --target $(PLUGIN_TARGET) --manifest-path $(PLUGIN_DIR)/Cargo.toml
.PHONY: clean
clean:
cargo clean
rm -f $(PLUGIN_OUTPUT)
.PHONY: run
run: build
./target/release/jintemplify
.PHONY: test
test:
cargo test
.PHONY: all build plugin clean run test
.PHONY: ex1
ex1:
cargo run -- \
--template ./examples/main.yaml.j2 \
--variables ./examples/variables.yaml.j2 \
--plugin ./examples/plugin.yaml.j2 \
--env var1=env1 \
--default-env MY_ENV=2 \
--env file_path=README.md \
--output-file test.txt