Skip to content

ursm/puma-plugin-dartsass

Repository files navigation

puma-plugin-dartsass

A Puma plugin that starts dartsass:watch automatically when Puma starts in development. This eliminates the need for foreman or bin/dev — just run bin/rails s.

Based on the Puma plugin in tailwindcss-rails.

Installation

Add the gem to your Gemfile:

group :development do
  gem 'puma-plugin-dartsass', require: false
end

Then add the plugin to config/puma.rb:

plugin :dartsass if Rails.env.development?

That's it. bin/rails s will now start the Sass watcher alongside Puma.

How it works

When Puma starts, the plugin forks a child process that runs bin/rails dartsass:watch. The plugin monitors both processes — if Puma stops, the watcher is stopped; if the watcher crashes, Puma is stopped.

License

MIT

About

Puma plugin to run dartsass:watch automatically during development

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages