Prettier: add new package (#43866)

This commit is contained in:
Adam J. Stewart 2024-04-29 22:39:52 +02:00 committed by GitHub
parent aa00dcac96
commit c4439e86a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,25 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Prettier(Package):
"""Prettier is an opinionated code formatter."""
homepage = "https://prettier.io/"
url = "https://github.com/prettier/prettier/archive/refs/tags/3.2.5.tar.gz"
maintainers("adamjstewart")
license("MIT")
version("3.2.5", sha256="0ac58fbe50859feb06099670526460cef7f51c83fee458b02fc67e53ffd23f57")
depends_on("node-js", type=("build", "run"))
depends_on("npm", type="build")
def install(self, spec, prefix):
npm = which("npm", required=True)
npm("install", "--global", f"--prefix={prefix}")