Rubyists Assemble! We're currently raising funds to help drive the launch of 1.0! Join the effort today โ–ธ

Bundled Configurations

Bridgetown bundles a number of automation scripts to set up common project configurations. You can run these scripts using bin/bridgetown configure [CONFIGURATION]

The configurations we include are:

The full list of configurations can also be seen by running bridgetown configure without arguments.

Bundled configurations can also be run while creating a new Bridgetown project using the --configure= or -c flag and passing in a comma-separated list of configurations.

bridgetown new my_project -c swup,purgecss

A bit about the configurations

TailwindCSS

๐Ÿƒ Adds TailwindCSS with an empty configuration along with PurgeCSS.

Please be aware that you need to have PostCSS setup to run this configuration. You can create a new Bridgetown project with PostCSS using bridgetown new my_project --use-postcss.

This configuration will overwrite your postcss.config.js file.

๐Ÿ›  Configure using:

bin/bridgetown configure tailwindcss

PurgeCSS Post-Build Hook

๐Ÿงผ Adds a builder plugin which runs PurgeCSS against the output HTML + frontend JavaScript and produces a much smaller CSS output bundle for sites which use large CSS frameworks.

๐Ÿ›  Configure using:

bin/bridgetown configure purgecss

Stimulus

โš™๏ธ Sets up Stimulus and adds an example controller.

๐Ÿ›  Configure using:

bin/bridgetown configure stimulus

Turbo

โš™๏ธ Adds and configures Turbo.

๐Ÿ›  Configure using:

bin/bridgetown configure turbo

โ›“๏ธ Installs and configures a set of PostCSS plugins recommended by the Bridgetown community:

It will also configure postcss-preset-env to polyfill all features at stage 2 and above. If you donโ€™t need certain polyfills for your use case, you can bump up stage to 3 or 4 (for example, custom properties wonโ€™t get polyfilled if stage is set to 4). nesting-rules and custom-media-queries are explicitly enabled.

This configuration will overwrite your postcss.config.js file.

๐Ÿ›  Configure using:

bin/bridgetown configure bt-postcss

If youโ€™d like to customize your setup further you can find more plugins here.

Render YAML Configuration

โš™๏ธ Adds a static site service defined in YAML to your site for use in Render deployments.

๐Ÿ›  Configure using:

bin/bridgetown configure render

Netlify TOML Configuration

โš™๏ธ Adds a basic configuration to your site for use in Netlify deployments.

๐Ÿ›  Configure using:

bin/bridgetown configure netlify

Swup.js Page Transitions

โšก๏ธ Adds Swup for fast animated page transitions that make your site feel modern and cool. (If youโ€™ve used Turbo or Turbolinks, youโ€™ll love Swup!)

๐Ÿ›  Configure using:

bin/bridgetown configure swup

Automated Test Suite using Minitest

โš™๏ธ Adds a basic test suite using Minitest and Rails DOM assertions for extremely fast verification of your output HTML. Check out our automated testing guide for more info!

๐Ÿ›  Configure using:

bin/bridgetown configure minitesting

Cypress

โš™๏ธ Installs and sets up Cypress for browser based end-to-end testing. Check out our automated testing guide for more info!

๐Ÿ›  Configure using:

bin/bridgetown configure cypress

Next: Folder Structure