Swiftpack.co - wacumov/VerifyResourcesExistPublishPlugin as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by wacumov.
wacumov/VerifyResourcesExistPublishPlugin 0.1.0
A Publish plugin to verify that all resources to which items and pages have relative links exist.
⭐️ 5
🕓 4 years ago
.package(url: "https://github.com/wacumov/VerifyResourcesExistPublishPlugin.git", from: "0.1.0")

VerifyResourcesExistPublishPlugin

Status Swift 5.1 Swift Package Mac & Linux Publish Plugin

A Publish plugin to verify that all resources to which items and pages have relative links exist.

Installation

To install it into your Publish package, add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        ...
        .package(url: "https://github.com/wacumov/VerifyResourcesExistPublishPlugin", from: "0.1.0")
    ],
    targets: [
        .target(
            ...
            dependencies: [
                ...
                "VerifyResourcesExistPublishPlugin"
            ]
        )
    ]
    ...
)

Then import VerifyResourcesExistPublishPlugin wherever you’d like to use it:

import VerifyResourcesExistPublishPlugin

Usage

The plugin can then be used within any publishing pipeline like this:

import VerifyResourcesExistPublishPlugin
...
try DeliciousRecipes().publish(using: [
    ...
    .installPlugin(.verifyResourcesExist())
    ...
])

Note: .installPlugin(.verifyResourcesExist()) step should be performed after .copyResources() and .addMarkdownFiles() steps. Thus if you use the default publishing pipeline then pass .installPlugin(.verifyResourcesExist()) step to additionalSteps parameter instead of plugins parameter.

GitHub

link
Stars: 5
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics