# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.su>

_realname=webpack-cli
pkgbase=mingw-w64-nodejs-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-nodejs-${_realname}"
pkgver=6.0.1
pkgrel=1
pkgdesc='CLI for webpack & friends (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://webpack.js.org/api/cli/'
msys2_repository_url='https://github.com/webpack/webpack-cli'
msys2_references=(
  'purl: pkg:npm/webpack-cli'
)
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-nodejs")
source=("https://registry.npmjs.org/${_realname}/-/${_realname}-${pkgver}.tgz")
sha256sums=('f407788079854b0d48fb750da496c59cf00762dce3731520a4b375a377dec183')
noextract=("${_realname}-${pkgver}.tgz")

package() {
  "${MINGW_PREFIX}"/bin/npm install -g \
    --cache "${srcdir}/npm-cache" \
    --prefix "${pkgdir}${MINGW_PREFIX}" \
    "${srcdir}/${_realname}-${pkgver}.tgz"
}
