mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
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:
|
|
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
|
|
|
|
- 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:
|
|
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
|