Commit Graph

395 Commits

Author SHA1 Message Date
Chris Eppstein
390674ba83 [Configuration] [Command Line] Whether to generate relative links to assets is now controlled by a separate configuration flag and can be set via a command-line switch. 2009-08-29 13:19:36 -07:00
priit.mx.ee
c11be2eac6 Ruby 1.9.1 fix: binding for parse_string 2009-08-22 08:25:39 -07:00
Chris Eppstein
50aa936e02 [Rails] [Closes #32] Don't suggest creating a stylesheet link to partials. 2009-08-22 08:25:32 -07:00
Chris Eppstein
0492fc9969 Binary mode support for proper handling of binary files on Windows.
All images will now be installed using binary mode. Additionally, any file can
be installed in binary mode if the manifest specifies the option :binary => true
for that file.
2009-08-16 11:17:27 -07:00
Chris Eppstein
59a6067b3a Load haml-edge if it's all new and shiny. Closes GH-26. 2009-07-09 13:00:01 -07:00
Chris Eppstein
7fba6028d8 [Rails] Fixed a bug in rails integration if the request is not set on the controller. 2009-07-09 12:49:47 -07:00
Chris Eppstein
0809dd64dd Merge commit 'filiptepper/master'
* commit 'filiptepper/master':
  haml 2.2 dependency
2009-07-08 01:15:42 -07:00
Filip Tepper
85bb337f50 haml 2.2 dependency 2009-07-08 07:57:53 +02:00
Chris Eppstein
48a0356ad8 [Installer] Fixed a bug that caused the output after installing to not display the conditional comments. 2009-07-07 11:31:03 -07:00
Chris Eppstein
94e9696b30 [Rails] When installing into a new rails project, set the http paths correctly for stylesheets and javascripts. 2009-07-07 11:18:58 -07:00
Chris Eppstein
b7a9772efb [Sass Extensions] Fixed a copy & paste error that caused the http_images_path to not get picked up unless the http_stylesheets_path was also set. 2009-07-07 11:13:19 -07:00
Chris Eppstein
6b8bbd22b1 [Rails] Fixed a bug in asset hosts support when compiling outside the context of a controller. 2009-07-06 23:34:41 -07:00
Chris Eppstein
71d5ae8544 [Rails] If it exists, the compass test case should inherit from ActiveSupport::TestCase. 2009-07-06 21:46:00 -07:00
Chris Eppstein
43cb64d77e [Rails] Fixed bug introduced in 0.8.3. 2009-07-06 11:47:02 -07:00
Chris Eppstein
ff5c850014 [Compass Core] A new helper function stylesheet_url(path) can now be used to refer to assets that are relative to the css directory. 2009-07-06 07:18:25 -07:00
Chris Eppstein
21cfce33db [Extensions] When installing a file, the :like option can now be set to have it installed into the same location as what it is like. 2009-07-06 07:18:25 -07:00
Chris Eppstein
6555ab3952 [Configuration] A more logical and consistent approach to http path locations. 2009-07-06 07:18:25 -07:00
Chris Eppstein
956c437fe9 [Configuration] [Command Line] Whether to generate relative links to assets is now controlled by a separate configuration flag and can be set via a command-line switch. 2009-07-06 07:18:25 -07:00
David Turnbull
07ade33da3 Fix 'script' 'javascript' mismatch. Allow use of javascript command in manifest. 2009-07-05 17:29:30 -07:00
Joe Wasson
ebfa4709b1 Fix bug #15: Errno:EACCES on Windows when trying to compile identical file (on watch)
Per https://prototype.lighthouseapp.com/projects/8888/tickets/16-permission-denied-building-via-sprockets-on-windows you can't do File.utime on an open file in Windows.  Changed the reading of the existing file to IO.read() which will close the file on completion of the read.
2009-07-04 22:30:33 -07:00
Chris Eppstein
f111bd73d5 [Command Line] Fixed a bug in --watch mode that caused changes to partials to not be noticed. 2009-06-28 16:25:28 -07:00
Chris Eppstein
d2acd343b8 [Command Line] Allow the configuration file being read to be specified explicitly. This also affects the output location of the --write-configuration command. 2009-06-28 14:41:02 -07:00
Chris Eppstein
f742f26208 [Command Line] Cleanup of the command-line usage output to make things more digestable. 2009-06-28 14:38:36 -07:00
Chris Eppstein
69cf32f70a [Configuration] The compass configuration can now be placed in .compass/config.rb if you so choose. 2009-06-28 14:33:55 -07:00
Chris Eppstein
84aec053d0 [Command Line] Allow the images and javascripts directories to be set via the command line. 2009-06-28 13:04:56 -07:00
Chris Eppstein
5a015b3824 [Sass Extensions] The inline_image() function can now be used to generate a data url that embeds the image data in the generated css file.
This function works like image_url() in that it expects the image to be a path relative to the images directory.

There are clear advantages and disadvantages to this approach.
See http://en.wikipedia.org/wiki/Data_URI_scheme for more details.

NOTE: Neither IE6 nor IE7 support data urls.
Using this approach with large images is discouraged.
2009-06-28 12:29:19 -07:00
Chris Eppstein
0a232bd922 [Compiler] Rewrite of the watch command that adds the following improvements:
1. For robustness, recompile is now based on comparison of corresponding css/sass file timestamps.
2. If a sass file is removed, the corresponding css file is automatically deleted.
3. CSS files will be automatically recompiled if removed. It is no longer necessary to resave the sass file.
4. First time compile is not performed if not necessary.
2009-06-27 18:45:34 -07:00
Chris Eppstein
15ebbfef30 Print a message when updating a project that has no files. They probably meant to install but forgot the directory argument. Closes #2. 2009-06-27 18:28:26 -07:00
Chris Eppstein
802bca6174 [Configuration] Allow additional sass options to be specified in the compass configuration using the sass_options property. 2009-06-27 13:05:30 -07:00
Chris Eppstein
047be06a0a [Configuration] Allow additional import paths to be declared within the compass configuration. 2009-06-27 12:15:28 -07:00
Chris Eppstein
ef47f3dd9d [Sass Extensions] Allow the asset host and cache busting strategies to be defined as part of the compass configuration. Closes #20. 2009-06-26 12:23:43 -07:00
Chris Eppstein
6348ea3e67 [Compass Internals] Don't emit a stylesheet link to partials when printing the installation results. 2009-06-21 02:24:39 -07:00
Chris Eppstein
27b821617a [Compass Core] +reset-display mixin and Sass Extensions for appending selectors and enumerating the elements for a given display type. 2009-06-20 18:06:47 -07:00
Enrico Bianco
77f6e02c0e [Blueprint] Upgrade to 0.9: Make IE conditional comments more configurable in project manifests 2009-06-20 15:52:36 -07:00
Chris Eppstein
4e7e51e2c5 [Rails] Require compass during plugin loading to avoid the wrong version of haml getting loaded first. 2009-06-20 15:10:00 -07:00
Chris Eppstein
8c9ebce494 [Rails] Don't unpack gems using sudo in the rails template. 2009-06-20 15:09:04 -07:00
Chris Eppstein
9170cac954 [Rails] Removed the compass logo from the installer. 2009-06-20 15:08:17 -07:00
Chris Eppstein
a6d9cd64c1 [Rails] Move the new rails compass installer under lib/compass/app_integration/rails. 2009-06-20 13:58:31 -07:00
Chris Eppstein
998168160b [Rails] image_url() now integrates with the rails asset handling code when stylesheets are generated within the rails container.
This causes your rails configuration for cache busting and asset hosts
to be picked up when generating your stylesheets. Unfortunately, all
that code runs within the context of a controller, so the stylesheets
have to be generated during first request to use this functionality.
2009-06-20 12:29:31 -07:00
Chris Eppstein
732b885897 [Command Line] Missing an equals sign for conditional assignment. 2009-06-20 12:29:30 -07:00
Chris Eppstein
2b3b781c33 [Examples] Refactor the module and file loading for Sass Extensions and application integration. Fixed broken unit tests. 2009-06-20 12:29:14 -07:00
Chris Eppstein
f1832d07ab [Compass Core] The image_url() sass function now adds timestamp invalidation to images to prevent them from being cached after changing. 2009-06-20 12:28:45 -07:00
Chris Eppstein
9f46524bde Fixed a bug that caused the current revision to not be set from the REVISION file. 2009-06-20 12:28:27 -07:00
Chris Eppstein
e37b3b4d24 Extracted the CSS Validator to a separate gem to keep the compass gem size small. 2009-06-05 10:02:47 -07:00
Chris Eppstein
7a3bc728f1 Proper version tracking that is compatible with jeweler. 2009-05-23 23:30:49 -07:00
Chris Eppstein
7b90aef5d4 [Rails] Don't set the output style in the compass.config file for rails projects. It will default according to the runtime environment. Closes GH-4. 2009-05-23 09:57:50 -07:00
Chris Eppstein
fcdaf41dbc [Command Line] Store sass cache files in the sass directory of the project. Closes GH-8. 2009-05-23 09:57:41 -07:00
Chris Eppstein
3921465e95 Don't unecessarily set the output style in the Compass TestCase. 2009-05-08 08:09:43 -07:00
Chris Eppstein
36992e0173 Remove some unecessary code. 2009-05-08 08:09:43 -07:00
Chris Eppstein
b2c403711b Return arguments from the configuration suitable for passing to the compass compiler. 2009-05-08 08:09:43 -07:00
Chris Eppstein
22b61e13a9 Added a NullLogger class that can be used to silence the compiler output via the :logger option. 2009-05-07 20:08:19 -07:00
Chris Eppstein
2c7eede9fb Factor out the css_path and sass_path methods for accessing the full path to respective compass project directories. 2009-05-07 20:05:51 -07:00
Chris Eppstein
70086c880b Fall back to normal loading if the haml-edge gem isn't found. 2009-05-07 10:24:32 -07:00
Sean Schofield
84f657027a Compass now depends on the haml-edge gem instead of haml. 2009-05-06 20:14:31 -04:00
Chris Eppstein
c40566c93b [Command Line] The --force option will now force recompilation. Useful when the stylesheets don't appear to need a recompile. 2009-05-02 15:18:26 -07:00
Chris Eppstein
ddfba8ec83 [Command Line] Fixed bug that caused the --write-configuration option to break. 2009-05-02 15:13:54 -07:00
Chris Eppstein
8aee42e5a1 [Compass Core] The image_url sass function now handles absolute urls correctly. 2009-04-29 08:26:27 -07:00
Chris Eppstein
6409be1646 [Command line] Make sure that compass frameworks required on the command-line will appear in the initial project configuration. 2009-04-29 08:19:35 -07:00
Chris Eppstein
e6b7774774 [Command line] Add a command line option that prints out where compass is installed. 2009-04-25 11:57:18 -07:00
Chris Eppstein
4a2b4c538e A more sensible order of command line options. 2009-04-25 10:48:38 -07:00
Chris Eppstein
531c90a1a4 [Command Line] Respect the -q (quiet) option during compilation. Set the quiet option when watching a project for changes. 2009-04-22 12:50:18 -07:00
Chris Eppstein
be594d2b1f [Command Line] Don't recompile sass files that haven't changed (taking import dependencies into account). 2009-04-22 12:48:00 -07:00
Chris Eppstein
cc1b603263 [Rails] Bug fix: The http_images_path configuration default should be "/images" instead of "/public/images". 2009-04-21 10:07:48 -07:00
Erik Bryn
2c89b21f82 Conditionally defining #blank? on String/NilClass
Signed-off-by: Chris Eppstein <chris@eppsteins.net>
2009-04-19 09:44:11 -07:00
Lee Nussbaum
d5f44081ef Set compass environment in plugin based on RAILS_ENV (currently used to set line_comments option).
Fix line_comments option for plugin.

Signed-off-by: Chris Eppstein <chris@eppsteins.net>
2009-04-19 09:43:58 -07:00
Chris Eppstein
cb2b5c0891 Slightly better followup message for rails projects installing patterns. 2009-04-07 00:22:22 -07:00
Chris Eppstein
ab42e46906 Update the copyright. 2009-04-07 00:22:22 -07:00
Chris Eppstein
559b981015 All commands must implement execute now. 2009-04-07 00:22:22 -07:00
Chris Eppstein
591bd882bf There were far too many things trying to be in charge of setting configuration. Now there are less. 2009-04-07 00:22:21 -07:00
Chris Eppstein
a56fe74dbb Fix a bug for the cases where http_images_path ends in a slash. 2009-04-06 00:35:47 -07:00
Chris Eppstein
ff14940206 Use a deterministic order for setting configuration defaults. 2009-04-06 00:35:19 -07:00
Chris Eppstein
6c0a301d91 centralize the config setup and parsing for commands. 2009-04-06 00:34:27 -07:00
Chris Eppstein
c36f63fd92 Incorporate Blueprint 0.8 grid changes, make the generated grid more closely match Blueprint's by adding an enumerate(prefix, startindex, endindex) sass function that generates a list of enumerated selectors. 2009-04-06 00:00:44 -07:00
Chris Eppstein
ae4daa2572 Better rails boot sequence for compass that is both rails and compass command line friendly. 2009-04-05 03:50:41 -07:00
Chris Eppstein
bed5fe3458 Added a new Sass function called image_url() that can be used instead of url() to link to an image relative to the images directory according to the compass project configuration. 2009-04-05 03:13:42 -07:00
Chris Eppstein
bb197d849b Strip some trailing whitespace. 2009-04-03 12:09:45 -07:00
Chris Eppstein
e18ed8118b Support for Framework Patterns.
A pattern is a folder in the framework's templates directory. It must
have a manifest file that tells compass what to install and where.
Unlike the project template, a pattern can be stamped out any number of
times.

It is best for pattern stylesheets to only provide example usage to get
the user started. All the core styles for the pattern should be
distributed as part of the framework's stylesheets as mixins to
facilitate easy upgrades and bug fixing on the part of the pattern's
maintainer.

Patterns can install stylesheets, images, javascripts, and arbitrary
files. The installer will put these assets into the correct locations
according to the project type (E.g. rails, stand-alone).

Example Usage:
compass --framework blueprint --pattern buttons
2009-04-03 01:06:23 -07:00
Chris Eppstein
43fc3be14b Generate a grid background image with the --grid-img command line option. 2009-04-02 21:27:55 -07:00
Chris Eppstein
63de13debd Validate your project's CSS files by running compass --validate. 2009-04-01 21:24:02 -07:00
Chris Eppstein
a8b36a6441 Remove a puts used for debugging. 2009-04-01 18:03:29 -07:00
Chris Eppstein
1991f729f0 Fixes to make the environment setting work correctly with configuration files and to correctly pass the :line_comments option to Sass::Engine. 2009-04-01 17:24:36 -07:00
Chris Eppstein
356f134621 Added a configuration helper method to access the compass load paths suitable for passing to the Sass option :load_paths 2009-03-16 20:08:38 -07:00
Thomas Reynolds
48b705943e fix --output-style to actually work 2009-03-12 11:50:37 -07:00
Chris Eppstein
28473d5293 Fixed bug in the watch_project command. 2009-02-25 09:43:39 -08:00
Chris Eppstein
e14f6968f1 Allow rails installs to proceed without requiring input if the css-dir and sass-dir options are set on the command line. 2009-02-21 00:27:48 -08:00
Chris Eppstein
43ee4e1c98 Added a new command line option to emit and update the stand-alone configuration file. 2009-02-21 00:15:24 -08:00
Chris Eppstein
95fd94428a Refactored the Configuration Singleton and the UpdateProject command so that it now relies more heavily on the configuration object. 2009-02-21 00:15:19 -08:00
Chris Eppstein
a8f6648a64 Give a better error when a framework is misspelled. 2009-02-20 17:07:56 -08:00
Chris Eppstein
7f63fe7a29 Clean up some of the command line documentation. 2009-02-20 14:39:01 -08:00
Chris Eppstein
ccf0dfa19a Rename the --source and --target command line options to --sass-dir and --css-dir respectively to match the configuration file syntax. 2009-02-20 14:38:33 -08:00
Chris Eppstein
39a4b48b5e Fixed a bug in the configuration parser.
Added Compass#sass_engine_options method to emit sass options suitable
for passing to Sass::Engine#new.

Added require tracking in the configuration parser and serializer.
2009-02-12 23:19:32 -08:00
Chris Eppstein
c391ce09c0 Import the configuration module by default and not just for installation. 2009-02-08 13:09:29 -08:00
Chris Eppstein
10e6808648 Detect identical files when writing files during install, compile, etc. Also centralize the actions to use the write_file action as much as possible. 2009-02-08 03:46:47 -08:00
Chris Eppstein
0dfd60671f Remove some unused methods. 2009-02-08 03:46:46 -08:00
Chris Eppstein
3adf6a6435 Extract a project compiler class from the update_project command. 2009-02-08 03:46:46 -08:00
Chris Eppstein
6c4759278e Don't return a trailing slash from templatize or targetize. 2009-02-08 03:46:46 -08:00
Chris Eppstein
c0c422c373 Consolodate error classes. 2009-02-08 03:46:46 -08:00
Chris Eppstein
9e80847ac7 Remove unused method. 2009-02-08 03:46:46 -08:00
Chris Eppstein
8a0d2b900c Clean up the version parsing code. 2009-02-08 03:46:46 -08:00
Chris Eppstein
29666e177c DRY up the different types of installs. 2009-02-08 03:46:46 -08:00
Chris Eppstein
a0552a67c4 Modify the update command to use the Actions module and Logger. Moved the compile action to the Actions module. 2009-02-08 03:46:46 -08:00
Chris Eppstein
dbc262fbe1 Factored out an Actions module for doing the filesystem actions like copying, making directories, etc. 2009-02-08 03:46:46 -08:00
Chris Eppstein
98a2f0538b Use the Compass.configuration singleton for updates. 2009-02-08 03:46:46 -08:00
Chris Eppstein
a7406659b6 New Ruby on Rails project installer. 2009-02-08 03:46:46 -08:00
Chris Eppstein
94f4471ad5 Better followup messages after installation. 2009-02-08 03:45:48 -08:00
Chris Eppstein
1da3b3ae9b Add a to method to Manifest::Entry to centralize the logic. 2009-02-08 03:45:48 -08:00
Chris Eppstein
d2a3046526 Make the Configuration class a singleton + added some access helpers to
the Compass module.
2009-02-08 03:45:48 -08:00
Chris Eppstein
91e081cd50 New project creation implemented using manifests and installation strategies. 2009-02-08 03:45:48 -08:00
Chris Eppstein
0ac537a81b Added a framework accessor for the current framework. 2009-02-08 03:45:48 -08:00
Chris Eppstein
61de5ae125 New base class for Compass Errors. 2009-02-08 03:45:48 -08:00
Chris Eppstein
59e626fe8b Factored out a Configuration object to parse stand-alone project configuration files. 2009-02-08 03:45:47 -08:00
Chris Eppstein
845fa14e71 Factored out a logger for the command line to tell the user what is happening. 2009-02-08 03:45:47 -08:00
Chris Eppstein
359be7e46e Added an import to the install_rails command line command. Bumped the version up to 0.3.9 2009-02-06 10:57:08 -08:00
Chris Eppstein
f316dd013e Centralize all the framework specific code into the frameworks directory. 2009-01-25 15:05:36 -08:00
Chris Eppstein
1e5502159b Refactor the Compass commands to centralize and cleanup the project commands. 2009-01-25 14:27:08 -08:00
Chris Eppstein
911041f355 Give a better error message to users with an unsupported version of haml installed. 2009-01-25 11:28:11 -08:00
Chris Eppstein
c8e07b4228 Make the compass watch command a little more understandable for first time users and handle Interrupt more gracefully. 2009-01-24 14:35:17 -08:00
Chris Eppstein
ff2a54af53 Changes to make the command-line tool more testable. 2009-01-19 07:52:39 -08:00
Chris Eppstein
5fce487ba8 Don't reference ARGV in the exec module. This makes testing easier. 2009-01-18 17:41:20 -08:00
Chris Eppstein
becda48b83 Allow passing a path to the rails project instead of requiring the user to change into the rails project directory first. 2009-01-18 17:04:20 -08:00
Chris Eppstein
f903da3434 Indifferent access (symbol, string) for Compass::Frameworks[] 2009-01-18 12:25:16 -08:00
Chris Eppstein
98035eea07 Better to keep the config file in the source directory. 2009-01-02 01:35:14 -08:00
Chris Eppstein
77077c6347 Allow a ruby configuration file named config.rb to be placed at the top of a compass project to import other plugins and frameworks. 2009-01-02 01:26:16 -08:00
Chris Eppstein
8b8ad95c15 Make framework plugins actually work. 2009-01-01 23:18:21 -08:00
Chris Eppstein
ebb22c1060 Register the blueprint framework as the correct name. 2009-01-01 23:14:51 -08:00
Chris Eppstein
a54ccae040 Don't limit the legal framework values on the command line. 2009-01-01 23:14:24 -08:00
Chris Eppstein
e93051d239 Add a command to list available frameworks. 2009-01-01 23:11:52 -08:00
Chris Eppstein
b021b77894 Allow frameworks more control over specifying where the templates and stylesheets are located. 2009-01-01 18:06:37 -08:00
Chris Eppstein
9631a403e3 Allow the project source and target directories to be different by specifying --source and --target to any of the command line commands. 2008-12-21 22:07:32 -08:00
Chris Eppstein
618bd788e1 Require rubygems helps to require sass when running locally instead of out of a gem. 2008-12-08 20:43:13 -08:00
Chris Eppstein
31370e20d8 Fixed the --imports command-line option so that it generates useful output for being passed to sass. E.g.:
sass `compass --imports` some_file.sass
2008-12-02 15:48:22 -08:00
Chris Eppstein
39265bafc3 Added a Sass Function called nest that performs a nesting operation on (possibly) comma delimited selectors and emits the result as a string.
For example:

nest(".foo", "a, em, b")

would render:

.foo a, .foo em, .foo b

The nest function can take any number of arguments and each argument can have any number of comma-delimited selectors.
2008-11-29 01:08:07 -08:00
Chris Eppstein
3fe8f6a675 Added a compass command-line option to watch a project and automatically recompile when it changes. Use compass --watch. 2008-11-04 11:55:57 -08:00
Chris Eppstein
f62b5589a7 Command line option to emit the compass import paths suitable for use in a PATH variable. 2008-10-21 09:06:35 -07:00
Chris Eppstein
e10cc76ca5 Fixed duplicate directory information in the rails initializer generator. 2008-10-13 07:49:44 -07:00
Chris Eppstein
9af18fa20f Added a basic test case. So far it can be used to make sure your stylesheets compile.
Eventually it should provide assertions for generated rules and styles.
2008-10-03 16:38:39 -07:00
Chris Eppstein
154a22406c Incorrect framework nesting in the compass initializers. The frameworks scope themselves. 2008-10-03 14:13:22 -07:00
Chris Eppstein
47157b483f Fixed a double slash and use File::SEPARATOR instead of slash for portability. 2008-10-01 23:27:38 -07:00
Ciaran Lee
7c465cc05d small fix to the 'lines to the head of your application.html.haml' 2008-08-31 00:04:03 +01:00
Chris Eppstein
e62b7942d6 YUI's base and fonts. Their reset is already in compass core.
Grid is still to come -- I'm still getting my head around its semantics.
2008-08-24 17:33:57 -07:00
Chris Eppstein
6efe31a066 Merb support 2008-08-24 12:57:49 -07:00
Chris Eppstein
b82966e03f bug fixes found now that things are starting to work. 2008-08-24 00:04:45 -07:00
Chris Eppstein
ca82bca962 rails installer for compass 2008-08-23 22:02:10 -07:00
Chris Eppstein
341979d937 cleanup command line processing of primary command 2008-08-23 17:18:45 -07:00
Chris Eppstein
88ed4591cc Initial Checkin of Compass. Used to be Blueprint-Sass. 2008-08-23 10:00:46 -07:00