upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / typescript-svelte-plugin / trunk / PKGBUILD
blobc00a55468bb21481bb966070afb79643b62fcaa1
1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
3 pkgname=typescript-svelte-plugin
4 pkgver=0.3.25
5 pkgrel=1
6 pkgdesc='TypeScript plugin for Svelte intellisense'
7 url=https://github.com/sveltejs/language-tools/tree/master/packages/typescript-plugin
8 license=('MIT')
9 arch=('any')
10 depends=('nodejs')
11 makedepends=('yarn')
12 source=("https://github.com/sveltejs/language-tools/archive/typescript-plugin-$pkgver/$pkgname-$pkgver.tar.gz")
13 b2sums=('d729cf8f4e39bfe239eb09c2cdfcd36a1f99a20fc3f5c5aeb93ddfe536bd4b9f92e25eaebc52371b6e534d26cb727c69c8a9c81cefeac8d1372ab27c47e19af7')
15 build() {
16   cd language-tools-typescript-plugin-$pkgver
17   yarn --frozen-lockfile
18   yarn workspace svelte2tsx build
19   cd packages/typescript-plugin
20   yarn build
23 package() {
24   install -d "$pkgdir"/usr/lib/node_modules/$pkgname
26   cd language-tools-typescript-plugin-$pkgver
27   install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
29   # Emulate `npm prune --production`
30   mv package.json{,.bak}
31   cd packages/typescript-plugin
32   yarn --frozen-lockfile --production
33   mv ../../package.json{.bak,}
35   cp -r dist node_modules package.json \
36     "$pkgdir"/usr/lib/node_modules/$pkgname
37   install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname README.md