From b263bfdcaf91da235c608709009eb7766b2e666d Mon Sep 17 00:00:00 2001 From: tka Date: Tue, 20 Dec 2011 00:18:44 +0800 Subject: [PATCH 1/2] if manifest_file not exists, discover :all --- lib/compass/installers/manifest.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/compass/installers/manifest.rb b/lib/compass/installers/manifest.rb index b5faf022..848b5a5d 100644 --- a/lib/compass/installers/manifest.rb +++ b/lib/compass/installers/manifest.rb @@ -141,11 +141,16 @@ module Compass # evaluated in a Manifest instance context def parse(manifest_file) with_manifest(manifest_file) do - open(manifest_file) do |f| - eval(f.read, instance_binding, manifest_file) - end - end - end + if File.exists?(manifest_file) + open(manifest_file) do |f| + eval(f.read, instance_binding, manifest_file) + end + else + eval("discover :all", instance_binding, manifest_file) + end + end + end + def instance_binding binding From bac8667fb4d0103b975dacc261ed1da08f455e49 Mon Sep 17 00:00:00 2001 From: tka Date: Tue, 20 Dec 2011 00:48:20 +0800 Subject: [PATCH 2/2] update docs for missing manifest file --- doc-src/content/help/tutorials/extensions.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc-src/content/help/tutorials/extensions.markdown b/doc-src/content/help/tutorials/extensions.markdown index 99e6d24d..11d24a66 100644 --- a/doc-src/content/help/tutorials/extensions.markdown +++ b/doc-src/content/help/tutorials/extensions.markdown @@ -174,10 +174,13 @@ You may also see some real manifest files here: ### Manifest Declarations + **Easy Mode:** If you just have some basic files and nothing fancy going on, simply place this line in your manifest: discover :all +If the file is missing `discover :all` is the default + This will cause compass to find all the files in your template and use the files' extension to determine where they should go. Alternatively, you can request that compass only discover files of a certain type. For example, the following will only discover javascript and image assets, you could then declare other file types on your own. discover :javascripts