Date: Monday, March 20, 2023 @ 04:04:30 Author: polyzen Revision: 1424373
Add typescript-svelte-plugin Added: typescript-svelte-plugin/ typescript-svelte-plugin/repos/ typescript-svelte-plugin/trunk/ typescript-svelte-plugin/trunk/PKGBUILD ----------+ PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) Added: typescript-svelte-plugin/trunk/PKGBUILD =================================================================== --- typescript-svelte-plugin/trunk/PKGBUILD (rev 0) +++ typescript-svelte-plugin/trunk/PKGBUILD 2023-03-20 04:04:30 UTC (rev 1424373) @@ -0,0 +1,43 @@ +# Maintainer: Daniel M. Capella <[email protected]> + +pkgname=typescript-svelte-plugin +pkgver=0.3.21 +pkgrel=1 +pkgdesc='TypeScript plugin for Svelte intellisense' +url=https://github.com/sveltejs/language-tools/tree/master/packages/typescript-plugin +license=('MIT') +arch=('any') +depends=('nodejs') +makedepends=('yarn') +source=("https://github.com/sveltejs/language-tools/archive/typescript-plugin-$pkgver/$pkgname-$pkgver.tar.gz") +b2sums=('8d8fd2075e43e001e0dc63a907396985877dbfd638291b5bdf35af7dc769e03fe02331301dfe30fdd43b7450de1c98c895f933728505355be3ca3e825f69a973') + +build() { + cd language-tools-typescript-plugin-$pkgver + yarn --frozen-lockfile + yarn workspace svelte2tsx build + cd packages/typescript-plugin + yarn build +} + +check() { + cd language-tools-typescript-plugin-$pkgver/packages/typescript-plugin + yarn test +} + +package() { + install -d "$pkgdir"/usr/lib/node_modules/$pkgname + + cd language-tools-typescript-plugin-$pkgver + install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE + + # Emulate `npm prune --production` + mv package.json{,.bak} + cd packages/typescript-plugin + yarn --frozen-lockfile --production + mv ../../package.json{.bak,} + + cp -r dist node_modules package.json \ + "$pkgdir"/usr/lib/node_modules/$pkgname + install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname README.md +}
