Permalink
Browse files

Added new rake tasks for managing the styles and added a log dir for …

…compass stats
  • Loading branch information...
1 parent c95e3d5 commit 26f096b4e33f2b7c56fa4de0fe45546e72cabec5 @adamstac committed Mar 11, 2011
Showing with 67 additions and 819 deletions.
  1. +44 −8 Rakefile
  2. +22 −0 log/compass-stats-20110311-000950.log
  3. +1 −811 public/stylesheets/stylesheet.css
View
@@ -4,16 +4,52 @@ Bundler.setup
namespace :styles do
- desc "Clears the stylesheets"
- task :clear do
- puts "*** Clearing the stylesheets ***"
- system "rm -Rfv public/stylesheets/*"
+ desc "Run compass stats"
+ task :stats => ["stats:default"]
+
+ namespace :stats do
+
+ task :default do
+ puts "*** Running compass stats ***"
+ system "compass stats"
+ end
+
+ desc "Create a log of compass stats"
+ task :log do
+ t = DateTime.now
+ filename = "compass-stats-#{t.strftime("%Y%m%d")}-#{t.strftime("%H%M%S")}.log"
+ log_dir = "log"
+ puts "*** Logging stats ***"
+ system "compass stats > #{log_dir}/#{filename}"
+ puts "Created #{log_dir}/#{filename}"
+ end
+
end
- desc "Clears and compiles the stylesheets"
- task :compile => :clear do
- puts "*** Compiling the stylesheets ***"
- system "compass compile"
+ desc "Clear the styles"
+ task :clear => ["compile:clear"]
+
+ desc "Compile new styles"
+ task :compile => ["compile:default"]
+
+ namespace :compile do
+
+ task :clear do
+ puts "*** Clearing styles ***"
+ system "rm -Rfv public/stylesheets/*"
+ end
+
+ task :default => :clear do
+ puts "*** Compiling styles ***"
+ system "compass compile"
+ end
+
+ desc "Compile new styles for production"
+ task :production => :clear do
+ puts "*** Compiling styles ***"
+ system "compass compile --output-style compressed --force"
+ end
+
end
end
@@ -0,0 +1,22 @@
+ exists public/stylesheets
+unchanged sass/stylesheet.sass
+| ----------------------------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- |
+| Filename | Rules | Properties | Mixins Defs | Mixins Used | CSS Rules | CSS Properties |
+| ----------------------------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- |
+| sass/_base.sass | 4 | 5 | 0 | 0 | -- | -- |
+| sass/_landscape.sass | 0 | 0 | 1 | 0 | -- | -- |
+| sass/_mobile-480.sass | 5 | 11 | 1 | 0 | -- | -- |
+| sass/_portrait.sass | 0 | 0 | 1 | 0 | -- | -- |
+| sass/_screen.sass | 6 | 11 | 0 | 1 | -- | -- |
+| sass/stylesheet.sass | 0 | 0 | 0 | 3 | DISABLED | DISABLED |
+| sass/partials/_color.sass | 0 | 0 | 0 | 0 | -- | -- |
+| sass/partials/_minimal-base-styles.sass | 59 | 40 | 0 | 2 | -- | -- |
+| sass/partials/_non-semantic-helper-classes.sass | 13 | 33 | 0 | 0 | -- | -- |
+| sass/partials/_typography.sass | 1 | 1 | 0 | 0 | -- | -- |
+| ----------------------------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- |
+| Total (10 files): | 88 | 101 | 3 | 6 | 0 | 0 |
+| ----------------------------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- |
+
+Install css_parser to enable stats on your css files:
+
+ gem install css_parser
Oops, something went wrong.

0 comments on commit 26f096b

Please sign in to comment.