# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                typescript
version             6.0.2
revision            0
checksums           rmd160  48e83e49f46c1bef448c1148813836ff2495917f \
                    sha256  0ae5c188a2f5db22df72fe5e74dcbc122afb52031a86dbac33e78a86db39c65e \
                    size    4515770

categories          lang
maintainers         @goranmoomin openmaintainer
license             Apache-2
description         TypeScript is JavaScript with syntax for types
long_description    TypeScript is a strongly typed programming language that \
                    builds on JavaScript, giving you better tooling at any \
                    scale.

homepage            https://www.typescriptlang.org
master_sites        https://registry.npmjs.org/${name}/-

distfiles          ${distname}.tgz

platforms           any
supported_archs     noarch

depends_lib-append  path:bin/node:nodejs24
depends_build-append \
                    path:bin/npm:npm11

use_configure       no

extract.mkdir       yes
extract {
    copy ${distpath}/${distname}.tgz ${worksrcpath}/${distname}.tgz
}

build {}

destroot {
    system -W ${worksrcpath} "npm install --global --prefix \
        [shellescape ${destroot}${prefix}] ${distname}.tgz"
}

livecheck.type      regex
livecheck.url       https://registry.npmjs.org/${name}
livecheck.regex     {"latest":"(.*?)"}
