mirror of
https://github.com/archlinux/aur.git
synced 2026-02-08 21:43:04 +01:00
26 lines
874 B
Bash
26 lines
874 B
Bash
# Maintainer: Guru <anjanaya@gmail.com>
|
|
pkgname=playwright-cli
|
|
pkgver=0.1.0
|
|
pkgrel=1
|
|
pkgdesc="CLI for browser automation - record, generate code, inspect selectors, take screenshots"
|
|
arch=('any')
|
|
url="https://playwright.dev/"
|
|
license=('Apache-2.0')
|
|
depends=('nodejs')
|
|
makedepends=('npm')
|
|
source=("https://registry.npmjs.org/@playwright/cli/-/cli-${pkgver}.tgz")
|
|
sha256sums=('83cc21857b4e76645b49b8cee4663cbc49b0c549ae3ead0f76cad17937f2df5e')
|
|
noextract=("cli-${pkgver}.tgz")
|
|
|
|
package() {
|
|
# Ensure system node/npm are used, bypassing version managers like asdf
|
|
export PATH="/usr/bin:$PATH"
|
|
|
|
npm install -g --prefix "${pkgdir}/usr" "${srcdir}/cli-${pkgver}.tgz"
|
|
|
|
# Fix permissions
|
|
find "${pkgdir}/usr" -type d -exec chmod 755 {} +
|
|
|
|
# Remove package.json references to $pkgdir
|
|
find "${pkgdir}" -name package.json -exec sed -i "s|${pkgdir}||g" {} +
|
|
}
|