Friday, December 3, 2010


Blueprint’s compress.rb

Purpose.

The purpose of refactoring Blueprint’s compress.rb and other scripts was to make it much more extensible and useful for developers working on multiple projects. Developers using Blueprint on one or two single sites don’t care that the full Blueprint distribution is packaged with the site. However, developers working on multiple sites from a single computer are often left with the hassle of keeping all these copies up-to-date, with extra custom files floating around and very much a large mess.
The goal of rewriting the compression script was to allow for extreme customization of the output Blueprint CSS as well as ease of keeping projects up-to-date with the newest Blueprint source without much hassle.

Basic Usage.

Navigating to the blueprint/lib folder and typing ruby compress.rb -h reveals the basics of using the command line to generate compressed Blueprint stylesheets.

ruby compress.rb -h


    joshua-claytons-computer:lib joshuaclayton$ ruby compress.rb -h
    Usage: compress.rb [options]
    Blueprint Compressor

    options
      -o, --output_path=OUTPUT_PATH    Define a different path to output generated CSS files to.
      -n, --namespace=BP_NAMESPACE     Define a namespace prepended to all Blueprint classes (e.g. .your-ns-span-24)
      -p, --project=PROJECT_NAME       If using the settings.yml file, PROJECT_NAME is the project name you want to export
          --column_width=COLUMN_WIDTH  Set a new column width (in pixels) for the output grid
          --gutter_width=GUTTER_WIDTH  Set a new gutter width (in pixels) for the output grid
          --column_count=COLUMN_COUNT  Set a new column count for the output grid
      -h, --help                       Show this help message.
 ruby compress.rb -p project1

No comments:

Post a Comment