.DEFAULT_GOAL := help
VERSION := $(shell cargo metadata --no-deps --format-version=1 | jq -r '.packages[] | select(.name=="lindera-wasm") | .version')
default:
@echo $(MAKEFILE_LIST)
clean:
cargo clean
rm -rf pkg
format:
cargo fmt
lint:
cargo clippy --features=cjk
test:
wasm-pack test --node
build:
wasm-pack build --release --features=cjk --target=bundler
publish:
wasm-pack publish --access=public --target=bundler
build-example:
cd example && \
jq '.version = "$(VERSION)"' ./package.json > ./temp.json && mv ./temp.json ./package.json && \
npm install && \
npm run build && \
cp index.html dist/index.html
run-example:
cd example && npm run start
tag:
git tag v$(VERSION)
git push origin v$(VERSION)
help:
@echo "Available targets:"
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'