pantry/projects/vitejs.dev/package.yml

45 lines
997 B
YAML
Raw Normal View History

distributable:
url: https://registry.npmjs.org/vite/-/vite-{{version}}.tgz
strip-components: 1
versions:
2024-01-12 22:25:11 +03:00
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:
2023-12-19 23:20:59 +03:00
dependencies:
darwinsys.com/file: '*'
2023-12-19 23:39:22 +03:00
linux:
strace.io: '*'
2023-12-19 23:20:59 +03:00
script:
- ls -l "{{prefix}}/bin"
- file "{{prefix}}/bin/vite"
2023-12-19 23:39:22 +03:00
- run: strace vite --version
if: linux
2023-12-19 23:20:59 +03:00
- vite --version
- test "$(vite --version | grep -o 'vite/[^ ]*')" = "vite/{{version.raw}}"
provides:
- bin/vite