SwiftyTailwind

0.5.0

💇 A Swift Package to pull and run Tailwind from a Swift process
tuist/SwiftyTailwind

What's New

0.5.0

2023-11-11T11:53:42Z

What's Changed

  • Fixes broken links in README by @csjones in #9
  • docs: add csjones as a contributor for content by @allcontributors in #10
  • chore(deps): update dependency apple/swift-log to from: "1.5.3" by @renovate in #11
  • chore(deps): update actions/checkout action to v4 by @renovate in #13
  • chore(deps): update dependency swift-server/async-http-client to from: "1.19.0" by @renovate in #12
  • chore(deps): update dependency apple/swift-tools-support-core to from: "0.6.1" by @renovate in #14
  • aarch64 support by @jagreenwood in #16

New Contributors

Full Changelog: 0.4.0...0.5.0

SwiftyTailwind 🍃

All Contributors

Netlify Status SwiftyTailwind

SwiftyTailwind is a Swift Package to lazily download and run the Tailwind CLI from a Swift project (e.g. Vapor app or Publish project).

Usage

First, you need to add SwiftyTailwind as a dependency in your project's Package.swift:

.package(url: "https://github.com/tuist/SwiftyTailwind.git", .upToNextMinor(from: "0.1.0"))

Once added, you'll create an instance of SwiftyTailwind specifying the version you'd like to use and where you'd like it to be downloaded.

let tailwind = SwiftyTailwind(version: .latest, directory: "./cache")

If you don't pass any argument, it defaults to the latest version in the system's default temporary directory. If you work in a team, we recommend fixing the version to minimize non-determinism across environments.

Initializing a tailwind.config.js

You can create a tailwind.config.js configuration file by running the initialize function on the SwiftyTailwind instance:

try await tailwind.initialize()

Check out all the available options in the documentation.

Running Tailwind

To run Tailwind against a project, you can use the run function:

try await subject.run(input: inputCSSPath, output: outputCSSPath, options: .content("views/**/*.html"))

If you'd like Tailwind to keep watching for file changes, you can pass the .watch option:

try await subject.run(input: inputCSSPath, 
                      output: outputCSSPath, 
                      options: .watch, .content("views/**/*.html"))

Check out all the available options in the documentation.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Chris
Chris

🖋

This project follows the all-contributors specification. Contributions of any kind welcome!

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

Last updated: Fri May 03 2024 06:42:52 GMT-0900 (Hawaii-Aleutian Daylight Time)