blob: 6e07b4142c802c186faa8bd9f792acfcfe83959f (
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
46
47
48
49
50
|
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
pkgname=stylelint-lsp
pkgver=2.0.1
pkgrel=1
pkgdesc='Stylelint Language Server'
arch=(any)
url=https://github.com/bmatcuk/stylelint-lsp
license=(MIT)
depends=(
nodejs
stylelint
typescript
)
makedepends=(
git
npm
pnpm
)
source=("git+$url.git#tag=v$pkgver?signed")
b2sums=('1ab1c858e96a5148fce31b617b01532b5fe140bc0220f4920095369b7fb02877c36153a1b4e48893dd56e8929b2fab2aae4d4237faf768deb45b0dba11f18e4f')
validpgpkeys=(BAAFE045FFA3EF32E994C33F744A40ED60D7626F) # Bob Matcuk <bmatcuk@gmail.com>
prepare() {
cd $pkgname
pnpm install --frozen-lockfile
}
build() {
cd $pkgname
pnpm build
}
package() {
local mod_dir=/usr/lib/node_modules/$pkgname
install -d "$pkgdir"/{usr/bin,$mod_dir}
ln -s $mod_dir/dist/index.js "$pkgdir"/usr/bin/stylelint-lsp
cd $pkgname
# Prune unnecessary packages
rm -r node_modules
npm install --production --ignore-scripts
rm -r node_modules/{stylelint,typescript}
cp -r dist node_modules package.json "$pkgdir"/$mod_dir
chmod +x "$pkgdir"/$mod_dir/dist/index.js
install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname README.md
install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
}
|