Sha256: b90d9d510bc1c5e80029d263ae3a410669710c4c0b71268e2360883b15430e43

Contents?: true

Size: 1.92 KB

Versions: 7

Compression:

Stored size: 1.92 KB

Contents

# Chlorine

A simple plugin for Rails 3 that removes files from a given set of directories when your server starts up.

# Why?

If you're using [Sass](http://sass-lang.com/) and you rename or delete a stylesheet, you're going to have to delete the old CSS file by hand. If you're using [Barista](http://github.com/sutto/barista) and you rename or delete a CoffeeScript source file, you're going to have to delete the compiled JavaScript by hand. If your code or a plugin uses the `tmp` directory, you're going to have to delete it periodically. Why bother?

Using Chlorine, these unwanted parts of your app's file tree will be deleted every time you start the server. Don't worry—you can exclude specific files and directories. For instance, if you're using CoffeeScript but you use jQuery, you can put the `jQuery.js` file in a `lib` subdirectory and tell Chlorine to ignore it.

## Installation

Just add `chlorine` to your `Gemfile`:

    gem 'chlorine'

then run

    rails generate chlorine:config

Now open `config/chlorine.yml` and edit to fit your needs. Chlorine won't do anything unless you configure it.

## Caution!

Chlorine deletes stuff. For goodness' sake, do a backup before you turn it on!

Also, be aware that **you can only exclude files and directories in the root of each dir**. Chlorine isn't smart (yet) about its configuration; you can't say "I want to delete everything in `public/javascripts` except for `lib/jQuery.js`"; you can only say "I want to delete everything in `public/javascripts` except for `lib`." There's no pattern-matching. Chlorine simply lists everything in the directory, and everything in that list that isn't in `excludes` is gone.

## License

All source is available under the MIT license. See LICENSE for details.

## Feedback?

Chlorine is pretty simple, but if you have ideas for improvement, just create an issue at [http://github.com/TrevorBurnham/chlorine/issues](http://github.com/TrevorBurnham/chlorine/issues).

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chlorine-0.1.7 README.md
chlorine-0.1.6 README.md
chlorine-0.1.5 README.md
chlorine-0.1.4 README.md
chlorine-0.1.2 README.md
chlorine-0.1.1 README.md
chlorine-0.1.0 README.md