Search code examples
sasscompass-sass

Compass - Changing default of "compass watch"


With SASS you are required to create a config.rb which manages the location of the app. I've recently changed the name of this file to "sass_config.rb" and can't figure out how to change the default of "compass watch" so that it finds my renamed file.

To clarify, when I run the following command compass correctly finds the file and continues with its normal behavior:

compass -c watch sass_config.rb

But when I run:

compass watch

It says:

Nothing to compile. If you're trying to start a new project, 
you have left off the directory argument.

How can I fix this behavior so it sees the file has been renamed by just running "compass watch"?


Solution

  • The configuration filename cannot be arbitrarily modified. It is hard coded within Compass to be in one of 5 locations (soon to be 4).

    https://github.com/chriseppstein/compass/blob/192107cb4f17bef52fdd8c0d961fe77f3edb44c4/lib/compass/configuration/helpers.rb#L137

    # TODO: Deprecate the src/config.rb location.
    KNOWN_CONFIG_LOCATIONS = ['config/compass.rb', ".compass/config.rb", "config/compass.config", "config.rb", "src/config.rb"]