Skip to content

Commit

Permalink
Add Package.swift to subdirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Piñera committed Nov 21, 2020
1 parent 56ecc99 commit f41f7ee
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .swift-version
@@ -1 +1 @@
5.1.2
5.2.5
2 changes: 1 addition & 1 deletion Package.swift
@@ -1,4 +1,4 @@
// swift-tools-version:5.1
// swift-tools-version:5.2

import PackageDescription

Expand Down
1 change: 1 addition & 0 deletions Templates/Package.swift
@@ -0,0 +1 @@
import PackageDescription
1 change: 1 addition & 0 deletions assets/Package.swift
@@ -0,0 +1 @@
import PackageDescription
1 change: 1 addition & 0 deletions bin/Package.swift
@@ -0,0 +1 @@
import PackageDescription
1 change: 1 addition & 0 deletions design/Package.swift
@@ -0,0 +1 @@
import PackageDescription
1 change: 1 addition & 0 deletions features/Package.swift
@@ -0,0 +1 @@
import PackageDescription
1 change: 1 addition & 0 deletions fixtures/Package.swift
@@ -0,0 +1 @@
import PackageDescription
@@ -1,4 +1,4 @@
// swift-tools-version:5.0
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
@@ -1,4 +1,4 @@
// swift-tools-version:5.0
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
4 changes: 4 additions & 0 deletions netlify.toml
@@ -0,0 +1,4 @@
[build]
base = "website/"
publish = "public/"
command = "yarn build"
1 change: 1 addition & 0 deletions tools/Package.swift
@@ -0,0 +1 @@
import PackageDescription
2 changes: 1 addition & 1 deletion tools/fixturegen/Package.swift
@@ -1,4 +1,4 @@
// swift-tools-version:5.1
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
2 changes: 1 addition & 1 deletion tools/tuistbench/Package.swift
@@ -1,4 +1,4 @@
// swift-tools-version:5.1
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
1 change: 1 addition & 0 deletions vendor/Package.swift
@@ -0,0 +1 @@
import PackageDescription
3 changes: 2 additions & 1 deletion website/.gitignore
Expand Up @@ -2,4 +2,5 @@ node_modules
.cache
public/
yarn-error.log
TODO
TODO
.build/
1 change: 1 addition & 0 deletions website/.swift-version
@@ -0,0 +1 @@
5.2.5
18 changes: 18 additions & 0 deletions website/Package.swift
@@ -0,0 +1,18 @@
// swift-tools-version:5.2
import PackageDescription

// This is necessary for 2 reasons:
// 1. It tricks SPM to not include the website/ directory in the generated Xcode project.
// Because there's a node_modules in it, Xcode is very slow indexing things.
// https://forums.swift.org/t/hiding-ignoring-directories-from-xcode-when-opening-swift-packages/35431/6
// 2. Netlify detects that there's a Package.swift and tries to build the package. There's
// no way to configure that on Netlify and therefore we need an empty target here.
let package = Package(
name: "website",
platforms: [.macOS(.v10_12)],
products: [],
dependencies: [],
targets: [
.target(name: "website")
]
)
Empty file.

0 comments on commit f41f7ee

Please sign in to comment.