Code Monkey home page Code Monkey logo

swiftytailwind's Introduction

header
CI status Commit Activity Twitter Followers Slack Workspace Slack Workspace
Book us with Cal.com

🕺 What's Tuist

Tuist is a command line tool that leverages project generation to abstract intricacies of Xcode projects, and uses it as a foundation to help teams maintain and optimize their large modular projects.

It's open source and written in Swift.

⬇️ Install

The recommended installation method is to install mise and then run mise install tuist to install Tuist.

You can check out the documentation to learn more about the rationale behind our installation approach and alternative approaches.

🌀 Bootstrap your first project

tuist init --platform ios
tuist edit # Customize your project manifest
tuist generate # Generates Xcode project & workspace
tuist build # Builds your project

Check out the project "Adopting Tuist" guide to learn more about Tuist and all its features.

📝 Documentation

Do you want to know more about what Tuist can offer you? Or perhaps want to contribute to the project and you need a starting point?

You can check out the project documentation.

🔬 Sample projects

You can find some sample projects in the fixtures folder or the awesome Tuist repo! 🎉

💰 Sponsors

The financial sustainability of the project is possible thanks to the ongoing contributions from our GitHub Sponsors and Open Collective Backers. From them, we'd like to give a special mention to the following sponsors:

🥇 Gold Sponsors

mondaycom_logo Monday.com is a cloud-based work operating system (Work OS) that empowers teams to run projects and workflows with confidence. It's a versatile platform that combines features of project management, workflow automation, and team collaboration to streamline the way teams work together.
lapse_logo Lapse is an app designed to reclaim how we take and share memories. A camera for living in the moment and a private photo journal for friends, not followers.

🥈 Silver sponsors

stream_logo Stream helps build scalable in-app chat or activity feeds in days. Product teams trust Stream to launch faster, iterate more often, and ship a better user experience.
runway_logo Runway streamlines collaboration and automation for mobile app releases, from kickoff to rollout.
emerge_logo Emerge Tools is a suite of revolutionary products designed to supercharge mobile apps and the teams that build them.
codemagic_logo Codemagic is a CI/CD tool for building world-class mobile apps.

🥉 Bronze sponsors

macpaw_logo asana_logo

💪 Companies using Tuist

tv2_logo depop_logo bendingspoons_logo globekeeper_logo getyourguide_logo
emplate_logo hh_logo trendyol_logo angrynerds_logo compass_logo
wefox_logo hedvig_logo takeoutcentral_logo olx_logo justeattakeaway_logo
dodopizza_logo olimpbet_logo vk_logo kinopoisk_logo qnips_logo
telepass_logo crunchyroll_logo

🙇‍ ️Supported by great companies

Great companies support the project by giving us access to their service through an open-source program.

1password_logo bugsnag_logo calcom_logo codemagic_logo

🧑‍💻 Want to contribute?

You can use our contribution docs to get started. If you don't have a specific issue in mind, we are more than happy to help you, just ask for help in a given issue or on our Slack. You can find good issues for first-time contributors here. We also offer issue bounties for some highly-valued issues.

✨ Core Team


Pedro Piñera


Marek Fořt


Kas


Daniele Formichelli


Mike Simons

🚀 Core Alumni

The following people were once core contributors helping steer the project in the right direction and ensuring we have a reliable foundation we can build new features upon:


Natan Rolnik


Andrea Cipriani


Oliver Atkinson


Romain Boulay


Kamil Harasimowicz


Luis Padron

Alfredo Delli Bovi

✨ Contributors

Thanks goes to these wonderful people:


kalkwarf

Marek Fořt

Kas

Natan Rolnik

svastven

Bernhard Huemer

Daniel Jankowski

Facundo Menzella

Eric Ito

Kamil Harasimowicz

Jakub Olejník

ldindu

George Tsifrikas

Privezentsev Yura

Fero

Heberti Almeida

Ben Scheirman

Jared Sorge

Joe Blau

David Chavez

Roman Podymov

Marcin Religa

Alfredo Delli Bovi

Jake Prickett

Daniele Formichelli

Sergey Petrachkov

Jinwoo, Kim

David Harris

Dmytro Mishchenko

Sam Pettersson

Josh Holtz

Jierong Li

Shai Mishali

Franz Busch

Tíarnán McGrath

Vitaly Chupryk

Roman Blum

Giovanni Filaferro

Andrés Pizá Bückmann

Gabriel Coutinho

Riccardo

Mauro Bolis

Peter Weishapl

Cruz

Sven Münnich

Santiago A. Delgado

Wojciech Kulik

Iain Smith

Max Kraev

Mustafa Yusuf

Daniel Barden

Zofia Kulus

David Peterson

Ikko Ashimine

Seto Elkahfi / 塞托·埃尔卡菲

apps4everyone

Lorenzo

Darko Damjanovic

Marvin Nazari

Robin Malhotra

Astromonkee

ezraberch

Christopher Constable

Yi Wang

Mustafa Dur

Luca Bartoletti

Sujata Chakraborty

Pavel Trafimuk

Alejandro Silva Fernández

Jake Adams

Sam Watts

Erk Ekin

Denis Morozov

orbitekk

Park Jae Hyun

Sean Berry

Isaac Halvorson

Mohit Saxena

Mikołaj Chmielewski

Tope Akinwande

TheInkedEngineer

Alexander Weiß

kyungpyoda

Ville Witt

paul.s

aniltaskiran

Javier Vieira

Aris Sarris

kimxwan0319

Florian Fittschen

Jesus (iOS)

Nicholas Kim

Alexandros Smponias

Go

Alberto Garcia

Andrea Scuderi

Diogo Autilio

Shahzad Majeed

Dan

Nikita Ivanchikov

Anastasia Kazantseva

Michael McGuire

Michael Collins

YoHan Cho

euriasb

MontakOleg

oozoofrog

Martin Strambach

sh-a-n

Batuhan Saka

SooHwanCho

Gary Riches

mustiikhalil

Serhii Butenko

Petrukha Ivan

Mathias Schreck

Yen-Chia Lin

Mary

Hyunjin

Kevin Aguilar

Andrew Roan

ibrahim oktay

Dmitriy Kulakov

Jaewon-Yun

tatagrigory

Denil Chungath

Victor Sarda

tzxdtc10

Thieme

Clemens Beck

Paul Taykalo

Vitaly Kravtsov

dc

baegteun

Vinícius Couto Tasso

안지훈

Dimash

danibachar

한석호(MilKyo)

Hai Feng Kao

Antti Laitala

PushedCrayon

Stefano Mondino

Łukasz Lech

costapombo

Ihor Savynskyi

Eduard Miniakhmetov

Alexander Filimonov

Gorbenko Roman

swiftytailwind's People

Contributors

allcontributors[bot] avatar antingle avatar csjones avatar jagreenwood avatar pepicrft avatar renovate[bot] avatar wsedlacek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

swiftytailwind's Issues

How to define TailwindCSS plugins?

In my current TailwindCSS project using JS I define plugins in a tailwind.config.js file such as:

plugins: [
    require("@tailwindcss/aspect-ratio"),
    require("@tailwindcss/typography")
]

This file is also where I extended the theme.

With Vapor and SwiftyTailwind, how can I achieve the same thing?

Following default setup instructions leads to error starting process

Hello, apologies if this has been asked before. I tried integrating SwiftyTailwind with an existing Vapor project, and despite SwiftyTailwind correctly finding the binary, I'm getting the following error when I try to actually run the Vapor project.

[ INFO ] Tailwind: /var/folders/cl/pm3kms754_zg_17w7d8_9d_r0000gq/T/SwiftyTailwind/v3.4.3/tailwindcss-macos-arm64 init
[ WARNING ] posix_spawn error: Permission denied (13), `["/var/folders/cl/pm3kms754_zg_17w7d8_9d_r0000gq/T/SwiftyTailwind/v3.4.3/tailwindcss-macos-arm64", "init"]`
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: posix_spawn error: Permission denied (13), `["/var/folders/cl/pm3kms754_zg_17w7d8_9d_r0000gq/T/SwiftyTailwind/v3.4.3/tailwindcss-macos-arm64", "init"]`

I then attempted running chmod +x tailwindcss-macos-arm64 in the Package directory (even though this seemed like it should be handled by the package code) and got the following, slightly different error.

[ INFO ] Tailwind: /var/folders/cl/pm3kms754_zg_17w7d8_9d_r0000gq/T/SwiftyTailwind/v3.4.3/tailwindcss-macos-arm64 init
[ WARNING ] posix_spawn error: Malformed Mach-o file (88), `["/var/folders/cl/pm3kms754_zg_17w7d8_9d_r0000gq/T/SwiftyTailwind/v3.4.3/tailwindcss-macos-arm64", "init"]`
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: posix_spawn error: Malformed Mach-o file (88), `["/var/folders/cl/pm3kms754_zg_17w7d8_9d_r0000gq/T/SwiftyTailwind/v3.4.3/tailwindcss-macos-arm64", "init"]`

Potentially relevant info below:

My file structure
Screenshot 2024-04-30 at 22 14 53

Tailwind configuration:

import Leaf
import SwiftyTailwind
import TSCBasic
import Vapor

func tailwind(_ app: Application) async throws {
    let resourecesDirectory = try AbsolutePath(validating: app.directory.resourcesDirectory)
    let publicDirectory = try AbsolutePath(validating: app.directory.publicDirectory)

    let tailwind = SwiftyTailwind()
    try await tailwind.initialize()
    try await tailwind.run(
        input: .init(validating: "Styles/app.css", relativeTo: resourecesDirectory),
        output: .init(validating: "styles/app.generated.css", relativeTo: publicDirectory),
        options: .content("\(app.directory.viewsDirectory)**/*.leaf")
    )
}

// configures your application
public func configure(_ app: Application) async throws {
    app.views.use(.leaf)
    
    try await tailwind(app)
    app.middleware.use(FileMiddleware(publicDirectory: app.directory.publicDirectory))
    
    try routes(app)
}

This seems like there is something potentially wrong with the library code, but it's hard for me to tell for sure as I'm not only new to Tailwind, but also to Vapor. Please let me know if any more information is necessary or if there is a step I missed. Thank you!

Add example code to run Vapor and Tailwind watch in parallel

Because I am frequently testing different class values while using Tailwind, it is important to me that Tailwind is watching for changes and constantly regenerating the css. The .watch option is easy to pass and exactly what I need for this.

However, because I am running the Vapor server in parallel with the Tailwind watch process, it was not clear to me how to get them to run alongside each other. I spent a lot of time trying to figure out how to do this. Luckily I came across this syntax which finally helped me set it up:

let resourcesDirectory = try AbsolutePath(validating: app.directory.resourcesDirectory)
let publicDirectory = try AbsolutePath(validating: app.directory.publicDirectory)
let tailwind = SwiftyTailwind()

async let tailwindRun: () = tailwind.run(
    input: .init(validating: "Styles/app.css", relativeTo: resourecesDirectory),
    output: .init(validating: "styles/app.generated.css", relativeTo: publicDirectory),
    options: .watch, .content("\(app.directory.viewsDirectory)/**/*.leaf"))

async let runApp: () = try await app.execute()

_ = await [try tailwindRun, try await runApp]

I feel like this should be added to the README to help others save time and also set up the .watch function alongside Vapor. (Also I don't really understand why this works, so if someone could provide an explanation too that would be fantastic)

Download extra dependencies

I am looking at using this project however I am considering using Liquid Web Components which have their own tailwind preset.

https://liquid.emd.design/liquid/guides/tailwindcss-integration/

Ideally I wouldn't need to use npm to download their package. Although it wouldn't be as simple as just using unpkg since their preset has a few dependencies itself.

image

Maybe SwiftyTailwind could just invoke npm for me instead of downloading the bin from the GitHub releases? I'm down for any other ideas to make this ergonomic.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/SwiftyTailwind.yml
  • actions/checkout v4
  • actions/cache v4
.github/workflows/deploy-docs.yml
  • actions/checkout v4
  • cloudflare/pages-action v1
  • macos 14
swift
Examples/PublishExample/Package.swift
  • johnsundell/publish from: "0.9.0"
Package.swift
  • apple/swift-tools-support-core from: "0.6.1"
  • apple/swift-docc-plugin from: "1.3.0"
  • apple/swift-log from: "1.5.4"
  • swift-server/async-http-client from: "1.21.0"

  • Check this box to trigger a request for Renovate to run again on this repository

AArch64 Support

Hi there!
I'm running a Vapor app in a VSCode dev container on macOS Sonoma.

When integrating this project, I get the error unableToDetermineBinaryName. After some debugging I determined the system is identifying the CPU arch as aarch64, which is not a defined CpuArchitecture.

I believe we should be able to use the arm64 tailwind binary?

Below is some po'd info:

po result

▿ Optional<ProcessResult>
  ▿ some : <ProcessResult: exit: terminated(code: 0), output:
 aarch64

>
    ▿ arguments : 2 elements
      - 0 : "uname"
      - 1 : "-m"
    ▿ environment : 37 elements
      ▿ 0 : 2 elements
        - key : "VSCODE_NLS_CONFIG"
        - value : "{\"locale\":\"en\",\"osLocale\":\"en\",\"availableLanguages\":{}}"
      ▿ 1 : 2 elements
        - key : "PROMPT_DIRTRIM"
        - value : "4"
      ▿ 2 : 2 elements
        - key : "_"
        - value : "/usr/bin/cat"
      ▿ 3 : 2 elements
        - key : "SWIFT_BRANCH"
        - value : "swift-5.9-release"
      ▿ 4 : 2 elements
        - key : "ELECTRON_RUN_AS_NODE"
        - value : "1"
      ▿ 5 : 2 elements
        - key : "POSTGRES_PORT"
        - value : "5432"
      ▿ 6 : 2 elements
        - key : "SWIFT_PLATFORM"
        - value : "ubuntu22.04"
      ▿ 7 : 2 elements
        - key : "SWIFT_SIGNING_KEY"
        - value : "A62AE125BBBFBB96A6E042EC925CC1CCED3D1561"
      ▿ 8 : 2 elements
        - key : "LESSCLOSE"
        - value : "/usr/bin/lesspipe %s %s"
      ▿ 9 : 2 elements
        - key : "VSCODE_CWD"
        - value : "/vscode/vscode-server/bin/linux-arm64/f1b07bd25dfad64b0167beb15359ae573aecd2cc"
      ▿ 10 : 2 elements
        - key : "LS_COLORS"
        - value : ""
      ▿ 11 : 2 elements
        - key : "REMOTE_CONTAINERS_SOCKETS"
        - value : "[\"/tmp/vscode-ssh-auth-c0b7d502-aca5-4ca5-868d-71a7e849a3de.sock\",\"/home/vscode/.gnupg/S.gpg-agent\"]"
      ▿ 12 : 2 elements
        - key : "REMOTE_CONTAINERS_IPC"
        - value : "/tmp/vscode-remote-containers-ipc-c0b7d502-aca5-4ca5-868d-71a7e849a3de.sock"
      ▿ 13 : 2 elements
        - key : "SHELL"
        - value : "/bin/bash"
      ▿ 14 : 2 elements
        - key : "POSTGRES_PASSWORD"
        - value : "vapor_password"
      ▿ 15 : 2 elements
        - key : "VSCODE_AGENT_FOLDER"
        - value : "/home/vscode/.vscode-server"
      ▿ 16 : 2 elements
        - key : "PWD"
        - value : "/vscode/vscode-server/bin/linux-arm64/f1b07bd25dfad64b0167beb15359ae573aecd2cc"
      ▿ 17 : 2 elements
        - key : "BROWSER"
        - value : "/vscode/vscode-server/bin/linux-arm64/f1b07bd25dfad64b0167beb15359ae573aecd2cc/bin/helpers/browser.sh"
      ▿ 18 : 2 elements
        - key : "VSCODE_IPC_HOOK_CLI"
        - value : "/tmp/vscode-ipc-d2387ea3-41ca-46ca-843a-6e9bf7c2ea41.sock"
      ▿ 19 : 2 elements
        - key : "POSTGRES_HOST"
        - value : "postgres"
      ▿ 20 : 2 elements
        - key : "USER"
        - value : "vscode"
      ▿ 21 : 2 elements
        - key : "REMOTE_CONTAINERS"
        - value : "true"
      ▿ 22 : 2 elements
        - key : "POSTGRES_DB"
        - value : "vapor_database"
      ▿ 23 : 2 elements
        - key : "HOSTNAME"
        - value : "b7927c1f4fa6"
      ▿ 24 : 2 elements
        - key : "SWIFT_WEBROOT"
        - value : "https://download.swift.org"
      ▿ 25 : 2 elements
        - key : "VSCODE_AMD_ENTRYPOINT"
        - value : "vs/workbench/api/node/extensionHostProcess"
      ▿ 26 : 2 elements
        - key : "SHLVL"
        - value : "1"
      ▿ 27 : 2 elements
        - key : "POSTGRES_USER"
        - value : "vapor_username"
      ▿ 28 : 2 elements
        - key : "HOME"
        - value : "/home/vscode"
      ▿ 29 : 2 elements
        - key : "RUST_TRACEBACK"
        - value : "1"
      ▿ 30 : 2 elements
        - key : "VSCODE_HANDLES_SIGPIPE"
        - value : "true"
      ▿ 31 : 2 elements
        - key : "SSH_AUTH_SOCK"
        - value : "/tmp/vscode-ssh-auth-c0b7d502-aca5-4ca5-868d-71a7e849a3de.sock"
      ▿ 32 : 2 elements
        - key : "VSCODE_HANDLES_UNCAUGHT_ERRORS"
        - value : "true"
      ▿ 33 : 2 elements
        - key : "VSCODE_L10N_BUNDLE_LOCATION"
        - value : ""
      ▿ 34 : 2 elements
        - key : "PATH"
        - value : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin"
      ▿ 35 : 2 elements
        - key : "SWIFT_VERSION"
        - value : "swift-5.9-RELEASE"
      ▿ 36 : 2 elements
        - key : "LESSOPEN"
        - value : "| /usr/bin/lesspipe %s"
    ▿ exitStatus : ExitStatus
      ▿ terminated : 1 element
        - code : 0
    ▿ output : Result<Array<UInt8>, Error>
      ▿ success : 8 elements
        - 0 : 97
        - 1 : 97
        - 2 : 114
        - 3 : 99
        - 4 : 104
        - 5 : 54
        - 6 : 52
        - 7 : 10
    ▿ stderrOutput : Result<Array<UInt8>, Error>
      - success : 0 elements
po output

▿ Optional<String>
  - some : "aarch64"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.