jintemplify 0.1.3

A tool to compose files using Jinja2 templates and YAML variables.
# Variables
PLUGIN_DIR = plugins/read_file
PLUGIN_TARGET = wasm32-unknown-unknown
PLUGIN_OUTPUT = $(PLUGIN_DIR)/target/$(PLUGIN_TARGET)/release/plugin.wasm

# Default target
all: build

# Build the main application
.PHONY: build
build:
	cargo build --release

# Build the plugin
.PHONY: plugin
plugin:
	cargo build --release --target $(PLUGIN_TARGET) --manifest-path $(PLUGIN_DIR)/Cargo.toml

# Clean the project
.PHONY: clean
clean:
	cargo clean
	rm -f $(PLUGIN_OUTPUT)

# Run the main application
.PHONY: run
run: build
	./target/release/jintemplify

# Test the project
.PHONY: test
test:
	cargo test

# For other utility targets
.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