blob: 143ab22d51682e92c85c510296c4585390ec43cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: Yufan You <ouuansteve at gmail>
_name=volar
pkgname=vue-language-server
pkgver=1.0.8
pkgrel=1
pkgdesc='Fast Vue Language Support Extension'
arch=('any')
url=https://github.com/johnsoncodehk/volar/tree/master/vue-language-tools/vue-language-server
license=('MIT')
depends=('nodejs')
makedepends=('npm' 'pnpm' 'typescript')
optdepends=('typescript: for use in typescript.tsdk')
source=("https://github.com/johnsoncodehk/$_name/archive/v$pkgver/$_name-$pkgver.tar.gz")
b2sums=('5838b85bc73d13c9f6fff2f078219ed6ff23b20c841195a6edd303a66ef1ca3d68058582281e436945e3b3c3c70854ca3e6635a8d85fbd98b099a57f795823f2')
prepare() {
cd $_name-$pkgver
pnpm install
}
build() {
cd $_name-$pkgver
npm run build
}
check() {
cd $_name-$pkgver
npm run test
}
package() {
cd $_name-$pkgver/vue-language-tools/$pkgname
local _npmdir=/usr/lib/node_modules/@$_name/$pkgname
install -d "$pkgdir"{/usr/bin,"$_npmdir"}
ln -s "$_npmdir"/bin/$pkgname.js "$pkgdir"/usr/bin/$pkgname
# Prune devDependencies
rm -r node_modules
npm install --production
cp -r bin node_modules out package.json "$pkgdir/$_npmdir"
install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
}
|