don't build rust code for browser-only tests

This commit is contained in:
nig 2025-01-02 13:11:35 +01:00 committed by ganthern
parent 4e51d6f260
commit bed43c6040
3 changed files with 8 additions and 4 deletions

View file

@ -31,9 +31,13 @@ export async function buildRuntimePackages() {
/**
* Build all packages in packages directory.
*/
export async function buildPackages(pathPrefix = ".") {
export async function buildPackages(pathPrefix = ".", exclude = []) {
const packages = await glob(`${pathPrefix}/packages/*`, { deep: 1, onlyDirectories: true })
for (const dir of packages) {
if (exclude.some((p) => dir.endsWith(p))) {
console.log(`skipping build for ${dir}`)
continue
}
if (process.platform === "win32") {
const before = process.cwd()
cd(dir)