KonnorRogers / bridgetown-automation-tailwindcss

An automation for adding TailwindCss to a project
MIT License
9 stars 2 forks source link
bridgetown bridgetown-automation tailwindcss

build

Purpose

An automation to add TailwindCSS to a Bridgetown site.

This automation is deprecated. Go checkout the official bridgetown tailwind integration.

https://www.bridgetownrb.com/docs/bundled-configurations#tailwindcss

This is not an official tailwind repository / product

What this automation does

This automation will create the following file:

It will replace the following file:

It will modify the following file:

It will add the following NPM packages:

Prerequisites

"Bridgetown >= 0.15.0"

bridgetown -v
# => bridgetown 0.17.0 "Mount Scott"

This project requires the apply command introduced in Bridgetown version >= 0.15.0

Usage

New project

bridgetown new <newsite> --apply="https://github.com/ParamagicDev/bridgetown-automation-tailwindcss"

Existing Project

cd <bridgetown-site>
[bundle exec] bridgetown apply "https://github.com/ParamagicDev/bridgetown-automation-tailwindcss"

Testing

Right now there is one big integration tests which is run via simple:

git clone https://github.com/ParamagicDev/bridgetown-automation-tailwindcss/
cd bridgetown-automation-tailwindcss
bundle install
bundle exec rake test

Testing with Docker

git clone https://github.com/ParamagicDev/bridgetown-automation-tailwindcss/
cd bridgetown-automation-tailwindcss
source docker.env && docker-compose up --build

Issues

Right now, the script does not do a smart replace of webpack.config.js. If you have a webpack config different from the stock version of Bridgetown it will be replaced with the default bridgetown version with a PostCss loader.

ActiveSupport issue

Sometimes you may see an error related to requiring ActiveSupport. Try rerunning the above command with bundle exec prepended, like so:

bundle exec bridgetown apply "https://github.com/ParamagicDev/bridgetown-automation-tailwindcss"