Skip to content

An open source design system that's fully customizable and agent ready

TypeScript
1.5 KB
Raw Blame
// swift-tools-version: 6.0
// Copyright (c) Meta Platforms, Inc. and affiliates.

// Experimental Astryx for Apple platforms (AST-082). Two products:
// - `Astryx`: SwiftUI views painted with the theme's tokens, the theme
//   environment, and core's localized messages (Sources/Astryx).
// - `AstryxNative`: the contract types generated by `pnpm generate:apple`
//   (Sources/AstryxNative/Generated; do not edit them by hand) and the logic
//   host.
// Page templates are a separate package in Templates/, with no products,
// because they are clone-only source and are never published.

import PackageDescription

let package = Package(
  name: "AstryxNative",
  defaultLocalization: "en",
  platforms: [.iOS(.v17), .macOS(.v14)],
  products: [
    .library(name: "Astryx", targets: ["Astryx"]),
    .library(name: "AstryxNative", targets: ["AstryxNative"]),
  ],
  targets: [
    .target(name: "AstryxNative", path: "Sources/AstryxNative"),
    // Resources holds core's catalog messages per locale, generated.
    .target(
      name: "Astryx",
      dependencies: ["AstryxNative"],
      path: "Sources/Astryx",
      resources: [.process("Resources")]
    ),
    .testTarget(name: "AstryxNativeTests", dependencies: ["AstryxNative"], path: "Tests/AstryxNativeTests"),
    .testTarget(
      name: "AstryxTests", dependencies: ["Astryx"], path: "Tests/AstryxTests",
      // A tiny image that stands in for an app-shipped icon asset.
      resources: [.process("Resources")]
    ),
  ]
)