Permalink
Browse files

Initial Checkin of Compass. Used to be Blueprint-Sass.

  • Loading branch information...
0 parents commit 88ed4591cce2d271c223a43e50ae3128acc35e87 @chriseppstein chriseppstein committed Aug 23, 2008
Showing with 3,060 additions and 0 deletions.
  1. +6 −0 .gitignore
  2. +80 −0 Rakefile
  3. +1 −0 VERSION
  4. +8 −0 bin/compass
  5. +73 −0 examples/blueprint_default/index.html
  6. +246 −0 examples/blueprint_default/parts/elements.html
  7. +100 −0 examples/blueprint_default/parts/forms.html
  8. +206 −0 examples/blueprint_default/parts/grid.html
  9. BIN examples/blueprint_default/parts/test-small.jpg
  10. BIN examples/blueprint_default/parts/test.jpg
  11. BIN examples/blueprint_default/parts/valid.png
  12. +4 −0 examples/blueprint_default/stylesheets/ie.sass
  13. BIN examples/blueprint_default/stylesheets/images/grid.png
  14. +4 −0 examples/blueprint_default/stylesheets/print.sass
  15. +12 −0 examples/blueprint_default/stylesheets/screen.sass
  16. +60 −0 examples/blueprint_plugins/index.html
  17. +84 −0 examples/blueprint_plugins/parts/fancy_type.html
  18. BIN examples/blueprint_plugins/parts/test-small.jpg
  19. BIN examples/blueprint_plugins/parts/test.jpg
  20. BIN examples/blueprint_plugins/parts/valid.png
  21. +4 −0 examples/blueprint_plugins/stylesheets/ie.sass
  22. BIN examples/blueprint_plugins/stylesheets/images/grid.png
  23. +4 −0 examples/blueprint_plugins/stylesheets/print.sass
  24. +14 −0 examples/blueprint_plugins/stylesheets/screen.sass
  25. +4 −0 examples/blueprint_scoped/stylesheets/ie.sass
  26. +4 −0 examples/blueprint_scoped/stylesheets/print.sass
  27. +8 −0 examples/blueprint_scoped/stylesheets/screen.sass
  28. +4 −0 examples/blueprint_scoped_form/stylesheets/ie.sass
  29. +4 −0 examples/blueprint_scoped_form/stylesheets/print.sass
  30. +12 −0 examples/blueprint_scoped_form/stylesheets/screen.sass
  31. +59 −0 examples/blueprint_semantic/index.html
  32. +84 −0 examples/blueprint_semantic/parts/fancy_type.html
  33. BIN examples/blueprint_semantic/parts/test-small.jpg
  34. BIN examples/blueprint_semantic/parts/test.jpg
  35. BIN examples/blueprint_semantic/parts/valid.png
  36. +4 −0 examples/blueprint_semantic/stylesheets/ie.sass
  37. BIN examples/blueprint_semantic/stylesheets/images/grid.png
  38. +4 −0 examples/blueprint_semantic/stylesheets/print.sass
  39. +72 −0 examples/blueprint_semantic/stylesheets/screen.sass
  40. +17 −0 frameworks/blueprint/lib/blueprint/constants.rb
  41. +54 −0 frameworks/blueprint/lib/blueprint/grid_builder.rb
  42. +19 −0 frameworks/blueprint/stylesheets/blueprint/_ie.sass
  43. +69 −0 frameworks/blueprint/stylesheets/blueprint/_print.sass
  44. +16 −0 frameworks/blueprint/stylesheets/blueprint/_screen.sass
  45. +37 −0 frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass
  46. +9 −0 frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass
  47. +85 −0 frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass
  48. +43 −0 frameworks/blueprint/stylesheets/blueprint/modules/_form.sass
  49. +148 −0 frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass
  50. +55 −0 frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass
  51. +18 −0 frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass
  52. +129 −0 frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass
  53. BIN frameworks/blueprint/templates/project/grid.png
  54. +4 −0 frameworks/blueprint/templates/project/ie.sass
  55. +4 −0 frameworks/blueprint/templates/project/print.sass
  56. +12 −0 frameworks/blueprint/templates/project/screen.sass
  57. +73 −0 frameworks/compass/stylesheets/compass/_reset.sass
  58. +54 −0 frameworks/compass/stylesheets/compass/_utilities.sass
  59. BIN frameworks/compass/templates/project/grid.png
  60. +3 −0 frameworks/compass/templates/project/ie.sass
  61. +4 −0 frameworks/compass/templates/project/print.sass
  62. +7 −0 frameworks/compass/templates/project/screen.sass
  63. +13 −0 lib/compass.rb
  64. +78 −0 lib/compass/commands/base.rb
  65. +30 −0 lib/compass/commands/create_project.rb
  66. +23 −0 lib/compass/commands/print_version.rb
  67. +91 −0 lib/compass/commands/update_project.rb
  68. +39 −0 lib/compass/core_ext.rb
  69. +138 −0 lib/compass/exec.rb
  70. +26 −0 lib/compass/frameworks.rb
  71. +2 −0 lib/compass/frameworks/blueprint.rb
  72. +2 −0 lib/compass/frameworks/compass.rb
  73. +13 −0 lib/compass/validate.rb
  74. +93 −0 lib/compass/validate/COPYRIGHT.html
  75. +64 −0 lib/compass/validate/JIGSAW_COPYRIGHT
  76. +83 −0 lib/compass/validate/README.html
  77. +56 −0 lib/compass/validate/XERCES_COPYING.txt
  78. BIN lib/compass/validate/css-validator-javadoc.jar
  79. BIN lib/compass/validate/css-validator.jar
  80. BIN lib/compass/validate/jigsaw.jar
  81. BIN lib/compass/validate/xerces.jar
  82. +59 −0 lib/compass/validator.rb
  83. +48 −0 lib/compass/version.rb
  84. +111 −0 test/compass_test.rb
  85. +4 −0 test/fixtures/default/templates/ie.sass
  86. +4 −0 test/fixtures/default/templates/print.sass
  87. +21 −0 test/fixtures/default/templates/screen.sass
  88. +37 −0 test/test_helper.rb
@@ -0,0 +1,6 @@
+*.DS_Store
+tmp/*
+built_examples/*
+test/tmp
+test/fixtures/*/saved
+test/fixtures/*/tmp
@@ -0,0 +1,80 @@
+require 'rubygems'
+require 'rake'
+require 'lib/compass'
+
+# ----- Default: Testing ------
+
+task :default => :tests
+
+require 'rake/testtask'
+require 'fileutils'
+
+Rake::TestTask.new :test do |t|
+ t.libs << 'lib'
+ test_files = FileList['test/**/*_test.rb']
+ test_files.exclude('test/rails/*', 'test/haml/*')
+ t.test_files = test_files
+ t.verbose = true
+end
+Rake::Task[:test].send(:add_comment, <<END)
+To run with an alternate version of Rails, make test/rails a symlink to that version.
+To run with an alternate version of Haml & Sass, make test/haml a symlink to that version.
+END
+
+
+desc "Compile Examples into HTML and CSS"
+task :examples do
+ linked_haml = "tests/haml"
+ if File.exists?(linked_haml) && !$:.include?(linked_haml + '/lib')
+ puts "[ using linked Haml ]"
+ $:.unshift linked_haml + '/lib'
+ end
+ require 'haml'
+ require 'sass'
+ require 'pathname'
+ FileList['examples/*'].each do |example|
+ puts "Compiling #{example} -> built_examples/#{example.sub(%r{.*/},'')}"
+ # compile any haml templates to html
+ FileList["#{example}/*.haml"].each do |haml_file|
+ basename = haml_file[9..-6]
+ engine = Haml::Engine.new(open(haml_file).read, :filename => haml_file)
+ target_dir = "built_examples/#{basename.sub(%r{/[^/]*$},'')}"
+ FileUtils.mkdir_p(target_dir)
+ output = open("built_examples/#{basename}",'w')
+ output.write(engine.render)
+ output.close
+ end
+ # compile any sass templates to css
+ FileList["#{example}/stylesheets/**/[^_]*.sass"].each do |sass_file|
+ basename = sass_file[9..-6]
+ css_filename = "built_examples/#{basename}.css"
+ compass_sass = File.dirname(__FILE__).sub(%r{.*/},'')
+ engine = Sass::Engine.new(open(sass_file).read,
+ :filename => sass_file,
+ :line_comments => true,
+ :css_filename => css_filename,
+ :load_paths => ["#{example}/stylesheets"] + Compass::Frameworks::ALL.map{|f| f.stylesheets_directory})
+ target_dir = "built_examples/#{basename.sub(%r{/[^/]*$},'')}"
+ FileUtils.mkdir_p(target_dir)
+ output = open(css_filename,'w')
+ output.write(engine.render)
+ output.close
+ end
+ # copy any other non-haml and non-sass files directly over
+ target_dir = "built_examples/#{example.sub(%r{.*/},'')}"
+ other_files = FileList["#{example}/**/*"]
+ other_files.exclude "**/*.sass", "*.haml"
+ other_files.each do |file|
+
+ if File.directory?(file)
+ FileUtils.mkdir_p(file)
+ elsif File.file?(file)
+ target_file = "#{target_dir}/#{file[(example.size+1)..-1]}"
+ # puts "mkdir -p #{File.dirname(target_file)}"
+ FileUtils.mkdir_p(File.dirname(target_file))
+ # puts "cp #{file} #{target_file}"
+ FileUtils.cp(file, target_file)
+ end
+ end
+ end
+end
@@ -0,0 +1 @@
+0.1.0
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby
+# The compass command line utility
+
+require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'compass'))
+require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'compass', 'exec'))
+
+command = Compass::Exec::Compass.new(ARGV)
+command.run!
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Blueprint test pages</title>
+
+ <!-- Framework CSS -->
+ <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="stylesheets/index.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="stylesheets/print.css" type="text/css" media="print">
+ <!--[if IE]><link rel="stylesheet" href="stylesheets/ie.css" type="text/css" media="screen, projection"><![endif]-->
+</head>
+<body>
+
+ <div class="container">
+ <h1>Blueprint test pages</h1>
+ <hr>
+
+ <p>Welcome to the Blueprint test pages. The HTML files below tests most HTML elements, and especially classes provided
+ by&nbsp;Blueprint.</p>
+
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <th class="span-6">Test page</th>
+ <th class="span-8">Main files tested</th>
+ <th class="span-10">Description</th>
+ </tr>
+ <tr>
+ <td><a href="parts/grid.html">Grid</a></td>
+ <td>
+ <a href="../../src/modules/_grid.sass">grid.sass</a>
+ </td>
+ <td>Tests classes provided by the grid module.</td>
+ </tr>
+ <tr class="even">
+ <td><a href="parts/elements.html">Typography</a></td>
+ <td>
+ <a href="../../src/modules/_typography.sass">typography.sass</a>
+ </td>
+ <td>Tests HTML elements which gets set in the typography module.</td>
+ </tr>
+ <tr>
+ <td><a href="parts/forms.html">Forms</a></td>
+ <td>
+ <a href="../../src/modules/_form.sass">form.sass</a>
+ </td>
+ <td>Tests classes and default look provided by the form module.</td>
+ </tr>
+ </table>
+
+ <p><em><strong>Note about the css files:</strong></em>
+ These test files utilize the css files that are generated from
+ <a href="http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html">Sass templates</a>.
+ In other words, if you change any of the source files,
+ you'll have to re-build them with <code>rake examples</code> to see any&nbsp;changes.</p>
+
+ <div class="box">
+ <p>For more information and help, try these resources:</p>
+ <ul class="bottom">
+ <li><a href="http://code.google.com/p/blueprintcss">The Blueprint home page.</a></li>
+ <li><a href="http://groups.google.com/group/blueprintcss">Our anything-goes mailing list.</a></li>
+ <li><a href="http://bjorkoy.com">The blog where news about Blueprint gets posted.</a></li>
+ </ul>
+ </div>
+
+ <p><a href="http://validator.w3.org/check?uri=referer">
+ <img src="parts/valid.png" alt="Valid HTML 4.01 Strict" height="31" width="88" class="top"></a></p>
+
+ </div>
+</body>
+</html>
Oops, something went wrong.

0 comments on commit 88ed459

Please sign in to comment.