-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Makefile
47 lines (34 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
install-rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
install-rust-deps:
rustup update
rustup target add wasm32-unknown-unknown
cargo install cargo-insta
rustup component add clippy
add-target:
rustup target add wasm32-unknown-unknown
install-all: install-rust install-rust-deps
install-cli:
cd src/optimizer/cli && cargo install --path .
fix:
cargo fmt
check:
cargo fmt -- --check && cargo check --all-features
lint:
cargo clippy --all-features && cargo check --all-features && cargo fmt -- --check
# We only test core because there are no other tests and qwik-napi breaks the build
test:
cargo test --manifest-path packages/qwik/src/optimizer/core/Cargo.toml
test-update:
if ! cargo test --manifest-path packages/qwik/src/optimizer/core/Cargo.toml; then \
cd packages/qwik/src/optimizer/core/src/snapshots/; \
for i in *.new; do f=$$(basename $$i .new); mv $$i $$f; done; \
cd -; \
cargo test --manifest-path packages/qwik/src/optimizer/core/Cargo.toml; \
fi
publish-core:
cd src/optimizer/core && cargo publish --all-features
publish-cli:
cd src/optimizer/cli && cargo publish
publish: publish-core publish-cli
validate: check lint test