From 53003122f24e1dd66c7a0999243cbd6c0f26e2ca Mon Sep 17 00:00:00 2001 From: Nihaal Sangha Date: Tue, 24 Mar 2026 12:00:13 +0000 Subject: [PATCH] Add PklProject filename to Pkl --- lib/linguist/languages.yml | 2 ++ samples/Pkl/filenames/PklProject | 43 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 samples/Pkl/filenames/PklProject diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index a1e2ed2f67..cca1e4b650 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -5845,6 +5845,8 @@ Pkl: color: "#6b9543" extensions: - ".pkl" + filenames: + - PklProject interpreters: - pkl tm_scope: source.pkl diff --git a/samples/Pkl/filenames/PklProject b/samples/Pkl/filenames/PklProject new file mode 100644 index 0000000000..61dad792ba --- /dev/null +++ b/samples/Pkl/filenames/PklProject @@ -0,0 +1,43 @@ +//===----------------------------------------------------------------------===// +// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//===----------------------------------------------------------------------===// + +amends "pkl:Project" + +package { + name = "pkl.swift" + baseUri = "package://pkg.pkl-lang.org/pkl-swift/\(name)" + packageZipUrl = + "https://github.com/apple/pkl-swift/releases/download/\(name)@\(version)/\(name)@\(version).zip" + version = read("../../VERSION.txt").text.trim() + authors { + "The Pkl Authors " + } + sourceCodeUrlScheme = + "https://github.com/apple/pkl-swift/blob/\(version)/codegen/src%{path}#L%{line}-L%{endLine}" + sourceCode = "https://github.com/apple/pkl-swift" + description = "Pkl bindings for the Swift programming language" + license = "Apache-2.0" + exclude { + "tests" + "tests/**" + } +} + +tests { + for (key, _ in import*("tests/*.pkl")) { + key + } +}