pantry/projects/vitejs.dev/package.yml
2024-01-12 14:25:11 -05:00

45 lines
997 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

distributable:
url: https://registry.npmjs.org/vite/-/vite-{{version}}.tgz
strip-components: 1
versions:
npm: vite
dependencies:
nodejs.org: ^16 || ^18 || ^20
build:
- npm install .
--global
--install-links
--prefix="{{prefix}}"
# minimize universal binaries
#TODO should probs be a general step we perform in CI/CD
- run:
- for x in $(pkgx fd --type x); do
# not all are unix binaries and I couldnt find a command to filter
# for those properly
- |
if lipo $x -thin $(uname -m) -output $x.new; then
mv $x.new $x
fi
- done
working-directory: ${{prefix}}/lib
test:
dependencies:
darwinsys.com/file: '*'
linux:
strace.io: '*'
script:
- ls -l "{{prefix}}/bin"
- file "{{prefix}}/bin/vite"
- run: strace vite --version
if: linux
- vite --version
- test "$(vite --version | grep -o 'vite/[^ ]*')" = "vite/{{version.raw}}"
provides:
- bin/vite