summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSainnhepark2020-11-06 10:35:31 +0800
committerSainnhepark2020-11-06 10:35:31 +0800
commit1f6c3e807aa91a32f97d821c937fbc45d2d22584 (patch)
treea993578a31a545c68a134b5530ee6305d3f556d7 /PKGBUILD
parent569487e48e3c90c2195834a869719e3c5ff1c673 (diff)
downloadaur-1f6c3e807aa91a32f97d821c937fbc45d2d22584.tar.gz
use yarn to install dependences
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD15
1 files changed, 8 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 52c9e816750..3fa94daf4a5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,16 +24,17 @@ pkgver() {
build() {
cd "${srcdir}/${_extname}"
- yarn install --frozen-lockfile --preferred-cache-folder "${srcdir}/.cache/yarn"
- yarn pack
- tar xvf *.tgz
- rm *.tgz
- cd package
- npm install --only=production --no-lockfile --ignore-scripts --cache "${srcdir}/.cache/npm"
+ yarn install --frozen-lockfile --preferred-cache-folder "${srcdir}/.cache"
}
package() {
- cd "${srcdir}/${_extname}/package"
+ cd "${srcdir}/${_extname}"
+ yarn pack; tar xvf *.tgz; rm *.tgz
+ cd package
+ _dependencies=$(grep -Po '"dependencies":' package.json) || _dependencies=""
+ if [ -n "${_dependencies}" ]; then
+ yarn install --production --no-lockfile --ignore-scripts --prefer-offline --preferred-cache-folder "${srcdir}/.cache"
+ fi
find . -type f -exec \
install -Dm 644 '{}' "${pkgdir}/${_packdir}/{}" \;
rm -rf "${srcdir}/${_extname}/package"