pantry/projects/vitejs.dev/package.yml

54 lines
1.3 KiB
YAML
Raw Normal View History

distributable:
url: https://github.com/vitejs/vite/archive/refs/tags/v{{version.raw}}.tar.gz
strip-components: 1
versions:
github: vitejs/vite/tags
strip: /v/
build:
dependencies:
2023-12-19 22:28:06 +03:00
pnpm.io: '*'
nodejs.org: ^16 || ^18 || ^20
deno.land: ^1.39 # Required
script:
- mkdir -p {{prefix}}/bin
# prevent pnpm from using symlinks
- echo "node-linker=hoisted" >> .npmrc
- echo "node-linker=hoisted" >> packages/vite/.npmrc
- pnpm i
- rm -rf node_modules
- run: |
pnpm i
sed -i 's/163/200/g' rollup.config.ts
# Required because it'll fail but still generate the required files
pnpm build || true
working-directory: packages/vite
2023-12-19 22:28:06 +03:00
- rm -rf node_modules
- pnpm i
- deno compile -o vite -Ar --unstable --unstable-byonm --node-modules-dir node_modules/vite/bin/vite.js
- cp vite {{prefix}}/bin/vite
# deno binaries are destroyed if patchelfed
skip: fix-patchelf
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