Browse Source

Replace exports for Node.js

pull/778/head
Henri Bergius 11 months ago
parent
commit
eefd0a4ec5
  1. 20
      .github/workflows/release-packages.yml

20
.github/workflows/release-packages.yml

@ -66,14 +66,6 @@ jobs:
cd $dir cd $dir
# Build and publish to npm if package.json exists
if [ -f "package.json" ]; then
echo "Building and publishing $dir to npm..."
pnpm install
pnpm run build:npm
pnpm run publish:npm || echo "npm publish failed for $dir"
fi
pnpm run prepare:jsr pnpm run prepare:jsr
# Publish to JSR if jsr.json exists # Publish to JSR if jsr.json exists
@ -82,10 +74,18 @@ jobs:
deno publish || echo "JSR publish failed for $dir" deno publish || echo "JSR publish failed for $dir"
fi fi
# Build and publish to npm if package.json exists
if [ -f "package.json" ]; then
echo "Building and publishing $dir to npm..."
pnpm install
pnpm run build:npm
# Use the JS Module file as export instead of the TypeScript file
sed -i 's/\".\/mod.ts\"/\".\/dist\/mod.mjs\"/g' "package.json"
pnpm run publish:npm || echo "npm publish failed for $dir"
fi
cd - > /dev/null cd - > /dev/null
else else
echo "Skipping $dir" echo "Skipping $dir"
fi fi
done done
Loading…
Cancel
Save