Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
build: use `just`-native dependency resolution
Elijah Potter16b73cb5a01a
diff --git a/justfile b/justfileindex 8b5fb9eb6..0a35e762c 100644--- a/justfile+++ b/justfile@@ -4,14 +4,13 @@ format:cd "{{justfile_directory()}}/packages"; yarn prettier -w .# Build the WebAssembly for a specific target (usually either `web` or `bundler`)-build-wasm target:- cd "{{justfile_directory()}}/harper-wasm" && wasm-pack build --target {{target}}+build-wasm:+ cd "{{justfile_directory()}}/harper-wasm" && wasm-pack build --target web# Build `harper.js` with all size optimizations available.-build-harperjs:+build-harperjs: build-wasm#! /bin/bashset -eo pipefail- just build-wasm web# Removes a duplicate copy of the WASM binary if Vite is left to its devices.perl -pi -e 's/new URL\(.*\)/new URL()/g' "{{justfile_directory()}}/harper-wasm/pkg/harper_wasm.js"@@ -23,10 +22,9 @@ build-harperjs:# Generate API reference./docs.sh-test-harperjs:+test-harperjs: build-harperjs#!/bin/bashset -eo pipefail- just build-harperjscd "{{justfile_directory()}}/packages/harper.js"yarn install -f@@ -50,22 +48,19 @@ dev-web:yarn dev# Build the Harper website.-build-web:+build-web: build-harperjs#! /bin/bashset -eo pipefail- just build-harperjs-cd "{{justfile_directory()}}/packages/web"yarn install -fyarn run build# Build the Harper Obsidian plugin.-build-obsidian:+build-obsidian: build-harperjs#! /bin/bashset -eo pipefail- just build-harperjscd "{{justfile_directory()}}/packages/obsidian-plugin"yarn install -f@@ -169,12 +164,10 @@ check-rust:cargo clippy -- -Dwarnings -D clippy::dbg_macro -D clippy::needless_raw_string_hashes# Perform format and type checking.-check:+check: check-rust build-web#! /bin/bashset -eo pipefail- just check-rust-cd "{{justfile_directory()}}/packages"yarn installyarn prettier --check .@@ -182,38 +175,21 @@ check:# Needed because Svelte has special linterscd web- just build-webyarn run check# Populate build caches and install necessary local tooling (tools callable via `yarn run <tool>`).-setup:- #! /bin/bash- set -eo pipefail-- cargo build- just build-harperjs- just build-obsidian- just test-vscode- just test-harperjs- just build-web+setup: build-harperjs build-obsidian test-vscode test-harperjs build-web# Perform full format and type checking, build all projects and run all tests. Run this before pushing your code.-precommit:+precommit: check test build-harperjs build-obsidian build-web#! /bin/bashset -eo pipefail- just check- just test-cargo doccargo buildcargo build --releasecargo bench- just build-harperjs- just build-obsidian- just build-web-# Install `harper-cli` and `harper-ls` to your machine via `cargo`install:cargo install --path harper-ls@@ -230,10 +206,8 @@ dogfood:done# Test everything.-test:+test: test-vscode test-harperjscargo test- just test-vscode- just test-harperjs# Use `harper-cli` to parse a provided file and print out the resulting tokens.parse file:diff --git a/packages/.prettierignore b/packages/.prettierignoreindex 0d184daaf..bf6b0ba42 100644--- a/packages/.prettierignore+++ b/packages/.prettierignore@@ -16,3 +16,7 @@ pnpm-lock.yamlpackage-lock.jsonyarn.lockdist++markdown+temp+web/static/docs/harperjs/ref