blueprintr 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +35 -0
  5. data/Rakefile +53 -0
  6. data/VERSION +1 -0
  7. data/bin/blueprintr +3 -0
  8. data/blueprintr.gemspec +119 -0
  9. data/lib/blueprint-css/.gitignore +5 -0
  10. data/lib/blueprint-css/AUTHORS.textile +42 -0
  11. data/lib/blueprint-css/CHANGELOG +159 -0
  12. data/lib/blueprint-css/LICENSE +314 -0
  13. data/lib/blueprint-css/README.textile +81 -0
  14. data/lib/blueprint-css/TUTORIAL.textile +206 -0
  15. data/lib/blueprint-css/blueprint/ie.css +35 -0
  16. data/lib/blueprint-css/blueprint/plugins/buttons/icons/cross.png +0 -0
  17. data/lib/blueprint-css/blueprint/plugins/buttons/icons/key.png +0 -0
  18. data/lib/blueprint-css/blueprint/plugins/buttons/icons/tick.png +0 -0
  19. data/lib/blueprint-css/blueprint/plugins/buttons/readme.txt +32 -0
  20. data/lib/blueprint-css/blueprint/plugins/buttons/screen.css +97 -0
  21. data/lib/blueprint-css/blueprint/plugins/fancy-type/readme.txt +14 -0
  22. data/lib/blueprint-css/blueprint/plugins/fancy-type/screen.css +71 -0
  23. data/lib/blueprint-css/blueprint/plugins/link-icons/icons/doc.png +0 -0
  24. data/lib/blueprint-css/blueprint/plugins/link-icons/icons/email.png +0 -0
  25. data/lib/blueprint-css/blueprint/plugins/link-icons/icons/external.png +0 -0
  26. data/lib/blueprint-css/blueprint/plugins/link-icons/icons/feed.png +0 -0
  27. data/lib/blueprint-css/blueprint/plugins/link-icons/icons/im.png +0 -0
  28. data/lib/blueprint-css/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  29. data/lib/blueprint-css/blueprint/plugins/link-icons/icons/visited.png +0 -0
  30. data/lib/blueprint-css/blueprint/plugins/link-icons/icons/xls.png +0 -0
  31. data/lib/blueprint-css/blueprint/plugins/link-icons/readme.txt +18 -0
  32. data/lib/blueprint-css/blueprint/plugins/link-icons/screen.css +40 -0
  33. data/lib/blueprint-css/blueprint/plugins/rtl/readme.txt +10 -0
  34. data/lib/blueprint-css/blueprint/plugins/rtl/screen.css +110 -0
  35. data/lib/blueprint-css/blueprint/print.css +29 -0
  36. data/lib/blueprint-css/blueprint/screen.css +258 -0
  37. data/lib/blueprint-css/blueprint/src/forms.css +65 -0
  38. data/lib/blueprint-css/blueprint/src/grid.css +280 -0
  39. data/lib/blueprint-css/blueprint/src/grid.png +0 -0
  40. data/lib/blueprint-css/blueprint/src/ie.css +76 -0
  41. data/lib/blueprint-css/blueprint/src/print.css +85 -0
  42. data/lib/blueprint-css/blueprint/src/reset.css +45 -0
  43. data/lib/blueprint-css/blueprint/src/typography.css +106 -0
  44. data/lib/blueprint-css/lib/blueprint/blueprint.rb +39 -0
  45. data/lib/blueprint-css/lib/blueprint/compressor.rb +265 -0
  46. data/lib/blueprint-css/lib/blueprint/core_ext.rb +39 -0
  47. data/lib/blueprint-css/lib/blueprint/css_parser.rb +69 -0
  48. data/lib/blueprint-css/lib/blueprint/custom_layout.rb +71 -0
  49. data/lib/blueprint-css/lib/blueprint/grid.css.erb +146 -0
  50. data/lib/blueprint-css/lib/blueprint/grid_builder.rb +54 -0
  51. data/lib/blueprint-css/lib/blueprint/namespace.rb +38 -0
  52. data/lib/blueprint-css/lib/blueprint/semantic_class_names.rb +57 -0
  53. data/lib/blueprint-css/lib/blueprint/validate/COPYRIGHT.html +93 -0
  54. data/lib/blueprint-css/lib/blueprint/validate/JIGSAW_COPYRIGHT +64 -0
  55. data/lib/blueprint-css/lib/blueprint/validate/README.html +83 -0
  56. data/lib/blueprint-css/lib/blueprint/validate/XERCES_COPYING.txt +56 -0
  57. data/lib/blueprint-css/lib/blueprint/validate/css-validator-javadoc.jar +0 -0
  58. data/lib/blueprint-css/lib/blueprint/validate/css-validator.jar +0 -0
  59. data/lib/blueprint-css/lib/blueprint/validate/jigsaw.jar +0 -0
  60. data/lib/blueprint-css/lib/blueprint/validate/xerces.jar +0 -0
  61. data/lib/blueprint-css/lib/blueprint/validator.rb +49 -0
  62. data/lib/blueprint-css/lib/compress.rb +149 -0
  63. data/lib/blueprint-css/lib/settings.example.yml +33 -0
  64. data/lib/blueprint-css/lib/validate.rb +15 -0
  65. data/lib/blueprint-css/templates/psd/fixed-width.psd +0 -0
  66. data/lib/blueprint-css/tests/index.html +83 -0
  67. data/lib/blueprint-css/tests/parts/elements.html +247 -0
  68. data/lib/blueprint-css/tests/parts/forms.html +191 -0
  69. data/lib/blueprint-css/tests/parts/grid.html +163 -0
  70. data/lib/blueprint-css/tests/parts/sample.html +75 -0
  71. data/lib/blueprint-css/tests/parts/test-small.jpg +0 -0
  72. data/lib/blueprint-css/tests/parts/test.jpg +0 -0
  73. data/lib/blueprint-css/tests/parts/valid.png +0 -0
  74. data/lib/blueprintr.rb +23 -0
  75. data/test/helper.rb +9 -0
  76. data/test/test_blueprintr.rb +14 -0
  77. metadata +139 -0
@@ -0,0 +1,93 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang='en' lang='en'>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
6
+ <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/base.css" />
7
+ <title>W3C IPR SOFTWARE NOTICE</title>
8
+ </head>
9
+ <body>
10
+ <h1>W3C<sup>&reg;</sup> SOFTWARE NOTICE AND LICENSE</h1>
11
+
12
+ <h3>Copyright &copy; 1997-2002 <a href="http://www.w3.org/">World
13
+ Wide Web Consortium</a>, (<a
14
+ href="http://www.lcs.mit.edu/">Massachusetts Institute of
15
+ Technology</a>, <a href="http://www.inria.fr/">Institut National de
16
+ Recherche en Informatique et en Automatique</a>, <a
17
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
18
+ Reserved. http://www.w3.org/Consortium/Legal/</h3>
19
+
20
+ <p>This W3C work (including software, documents, or other related
21
+ items) is being provided by the copyright holders under the
22
+ following license. By obtaining, using and/or copying this work,
23
+ you (the licensee) agree that you have read, understood, and will
24
+ comply with the following terms and conditions:</p>
25
+
26
+ <p>Permission to use, copy, modify, and distribute this software
27
+ and its documentation, with or without modification,&nbsp; for any
28
+ purpose and without fee or royalty is hereby granted, provided that
29
+ you include the following on ALL copies of the software and
30
+ documentation or portions thereof, including modifications, that
31
+ you make:</p>
32
+
33
+ <ol>
34
+ <li>The full text of this NOTICE in a location viewable to users of
35
+ the redistributed or derivative work.</li>
36
+
37
+ <li>Any pre-existing intellectual property disclaimers, notices, or
38
+ terms and conditions. If none exist, a short notice of the
39
+ following form (hypertext is preferred, text is permitted) should
40
+ be used within the body of any redistributed or derivative code:
41
+ "Copyright &copy; [$date-of-software] <a
42
+ href="http://www.w3.org/">World Wide Web Consortium</a>, (<a
43
+ href="http://www.lcs.mit.edu/">Massachusetts Institute of
44
+ Technology</a>, <a href="http://www.inria.fr/">Institut National de
45
+ Recherche en Informatique et en Automatique</a>, <a
46
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
47
+ Reserved. http://www.w3.org/Consortium/Legal/"</li>
48
+
49
+ <li>Notice of any changes or modifications to the W3C files,
50
+ including the date changes were made. (We recommend you provide
51
+ URIs to the location from which the code is derived.)</li>
52
+ </ol>
53
+
54
+ <p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND
55
+ COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
56
+ IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
57
+ MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
58
+ USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
59
+ PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
60
+
61
+ <p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
62
+ SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
63
+ SOFTWARE OR DOCUMENTATION.</p>
64
+
65
+ <p>The name and trademarks of copyright holders may NOT be used in
66
+ advertising or publicity pertaining to the software without
67
+ specific, written prior permission. Title to copyright in this
68
+ software and any associated documentation will at all times remain
69
+ with copyright holders.</p>
70
+
71
+ <p>____________________________________</p>
72
+
73
+ <p>This formulation of W3C's notice and license became active on
74
+ August 14 1998 so as to improve compatibility with GPL. This
75
+ version ensures that W3C software licensing terms are no more
76
+ restrictive than GPL and consequently W3C software may be
77
+ distributed in GPL packages. See the <a
78
+ href="copyright-software-19980519.html">older formulation</a> for
79
+ the policy prior to this date. Please see our <a
80
+ href="IPR-FAQ.html">Copyright FAQ</a> for common questions about
81
+ using materials from our site, including specific terms and
82
+ conditions for packages like libwww, Amaya, and Jigsaw. Other
83
+ questions about this notice can be directed to <a
84
+ href="mailto:site-policy@w3.org">site-policy@w3.org</a>.<br />
85
+ &nbsp;</p>
86
+
87
+ <p>&nbsp;</p>
88
+
89
+ <address><a href="http://www.w3.org/Help/Webmaster.html">webmaster</a><br />
90
+ (last updated $Date: 2004/05/29 04:04:36 $)</address>
91
+
92
+ </body>
93
+ </html>
@@ -0,0 +1,64 @@
1
+ W3C IPR SOFTWARE NOTICE
2
+
3
+ Copyright � 1995-1998 World Wide Web Consortium, (Massachusetts Institute of
4
+ Technology, Institut National de Recherche en Informatique et en
5
+ Automatique, Keio University). All Rights Reserved.
6
+ http://www.w3.org/Consortium/Legal/
7
+
8
+ This W3C work (including software, documents, or other related items) is
9
+ being provided by the copyright holders under the following license. By
10
+ obtaining, using and/or copying this work, you (the licensee) agree that you
11
+ have read, understood, and will comply with the following terms and
12
+ conditions:
13
+
14
+ Permission to use, copy, and modify this software and its documentation,
15
+ with or without modification, for any purpose and without fee or royalty is
16
+ hereby granted, provided that you include the following on ALL copies of the
17
+ software and documentation or portions thereof, including modifications,
18
+ that you make:
19
+
20
+ 1. The full text of this NOTICE in a location viewable to users of the
21
+ redistributed or derivative work.
22
+ 2. Any pre-existing intellectual property disclaimers, notices, or terms
23
+ and conditions. If none exist, a short notice of the following form
24
+ (hypertext is preferred, text is permitted) should be used within the
25
+ body of any redistributed or derivative code: "Copyright � World Wide
26
+ Web Consortium, (Massachusetts Institute of Technology, Institut
27
+ National de Recherche en Informatique et en Automatique, Keio
28
+ University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
29
+ 3. Notice of any changes or modifications to the W3C files, including the
30
+ date changes were made. (We recommend you provide URIs to the location
31
+ from which the code is derived).
32
+
33
+ In addition, creators of derivitive works must include the full text of this
34
+ NOTICE in a location viewable to users of the derivitive work.
35
+
36
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
37
+ MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
38
+ LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
39
+ PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
40
+ ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
41
+
42
+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
43
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
44
+ DOCUMENTATION.
45
+
46
+ The name and trademarks of copyright holders may NOT be used in advertising
47
+ or publicity pertaining to the software without specific, written prior
48
+ permission. Title to copyright in this software and any associated
49
+ documentation will at all times remain with copyright holders.
50
+
51
+ ____________________________________
52
+
53
+ This formulation of W3C's notice and license became active on August 14
54
+ 1998. See the older formulation for the policy prior to this date. Please
55
+ see our Copyright FAQ for common questions about using materials from our
56
+ site, including specific terms and conditions for packages like libwww,
57
+ Amaya, and Jigsaw. Other questions about this notice can be directed to
58
+ site-policy@w3.org .
59
+
60
+
61
+
62
+
63
+ webmaster
64
+ (last updated 14-Aug-1998)
@@ -0,0 +1,83 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>CSS Validator Binary Distribution - Illumit</title>
5
+ <link title="RSS Feed" type="application/rss+xml" rel="alternate" href="http://www.illumit.com/site.rss" />
6
+ </head>
7
+ <body>
8
+ <h1>CSS Validator Binary Distribution</h1>
9
+ <p>This a binary distribution of <a href="http://jigsaw.w3.org/css-validator">W3C CSS Validator</a>.
10
+ It was built from the <a href="http://dev.w3.org/cvsweb/2002/css-validator">source</a> on June 25, 2006.
11
+ No modifications were made.</p>
12
+
13
+ <p>This distribution is provided <a href="#asis">as is</a> to make testing a large number of CSS files easier.</p>
14
+
15
+
16
+ <h2>Requirements</h2>
17
+ <p>A Java 2 Virtual Machine is required to use the validator.
18
+ You can download one from <a href="http://java.sun.com/">Sun</a> if you do not have one installed.</p>
19
+
20
+ <h2>Usage</h2>
21
+ <h2>Summary</h2>
22
+ <p><code>java -jar <samp>~/css-validator/</samp>css-validator.jar [-options] files URLs</code></p>
23
+ <h2>Sample</h2>
24
+ <pre>
25
+ java -jar ~/css-validator/css-validator.jar f1.css http://illumit.com/
26
+ </pre>
27
+ <h2>Options</h2>
28
+ <dl>
29
+ <dt>-e</dt><dd>Show errors only.</dd>
30
+ <dt>-html</dt><dd>Output HTML.</dd>
31
+ <dt>-css1 | -css2 | -css21 | -css3 | -svg | -svgbasic | -svgtiny</dt>
32
+ <dd>Specify CSS version. CSS2 is the default.</dd>
33
+ </dl>
34
+
35
+ <h2>Support</h2>
36
+
37
+ <p>If you have questions about how this distribution is built or packaged,
38
+ <a href="mailto:contact@illumit.com">mailto:contact@illumit.com</a>.</p>
39
+
40
+ <p>Use the CSS Validator <a href="http://jigsaw.w3.org/css-validator/Email">Feedback</a>
41
+ page if you have any questions or problems with the validator itself.</p>
42
+
43
+ <p class="Footnote">Updates are announced on via
44
+ <a class="RSSLink" rel="alternate" type="application/rss+xml" href="http://www.illumit.com/site.rss">RSS</a></p>
45
+
46
+ <!--
47
+ <h2>Contents</h2>
48
+ <ul>
49
+ <li><a href="css-validator.jar">css-validator.jar</a> Executable JAR package</li>
50
+ <li><a href="COPYRIGHT.html">COPYRIGHT.html</a> CSS Validator Copyright Notice</li>
51
+ <li><a href="css-validator-javadoc.jar">css-validator-javadoc.jar</a> CSS Validator API Docs</li>
52
+ <li>Required libraries:<ul>
53
+ <li><a href="jigsaw.jar">jigsaw.jar</a> and <a href="JIGSAW_COPYRIGHT">JIGSAW_COPYRIGHT</a></li>
54
+ <li><a href="xerces.jar">xerces.jar</a> and <a href="XERCES_COPYING.txt">XERCES_COPYING.txt</a></li>
55
+ </ul>
56
+ </li>
57
+ </ul>
58
+ -->
59
+
60
+ <h2>Download</h2>
61
+
62
+ <p>Download the css validator binary distribution <a href="css-validator.zip">css-validator.zip</a>. Extract the files (OS X and *ix users can use unzip).</p>
63
+
64
+
65
+ <h2><a name="asis">License Agreement</a></h2>
66
+
67
+ <p>This is a binary distribution of <a href="http://jigsaw.w3.org/css-validator">W3C CSS Validator</a> Version 2.0
68
+ It was built from the <a href="http://dev.w3.org/cvsweb/2002/css-validator">source</a> on June 25, 2006.
69
+ No modifications were made to the source.</p>
70
+
71
+ <p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND
72
+ ILLUMIT L.L.C AND THE COPYRIGHT HOLDERS (W3C) MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
73
+ IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
74
+ MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
75
+ USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
76
+ PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
77
+
78
+ <p>ILLUMIT L.L.C AND THE COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
79
+ SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
80
+ SOFTWARE OR DOCUMENTATION.</p>
81
+
82
+ </body>
83
+ </html>
@@ -0,0 +1,56 @@
1
+ /*
2
+ * The Apache Software License, Version 1.1
3
+ *
4
+ *
5
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
6
+ * reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ *
12
+ * 1. Redistributions of source code must retain the above copyright
13
+ * notice, this list of conditions and the following disclaimer.
14
+ *
15
+ * 2. Redistributions in binary form must reproduce the above copyright
16
+ * notice, this list of conditions and the following disclaimer in
17
+ * the documentation and/or other materials provided with the
18
+ * distribution.
19
+ *
20
+ * 3. The end-user documentation included with the redistribution,
21
+ * if any, must include the following acknowledgment:
22
+ * "This product includes software developed by the
23
+ * Apache Software Foundation (http://www.apache.org/)."
24
+ * Alternately, this acknowledgment may appear in the software itself,
25
+ * if and wherever such third-party acknowledgments normally appear.
26
+ *
27
+ * 4. The names "Xerces" and "Apache Software Foundation" must
28
+ * not be used to endorse or promote products derived from this
29
+ * software without prior written permission. For written
30
+ * permission, please contact apache@apache.org.
31
+ *
32
+ * 5. Products derived from this software may not be called "Apache",
33
+ * nor may "Apache" appear in their name, without prior written
34
+ * permission of the Apache Software Foundation.
35
+ *
36
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47
+ * SUCH DAMAGE.
48
+ * ====================================================================
49
+ *
50
+ * This software consists of voluntary contributions made by many
51
+ * individuals on behalf of the Apache Software Foundation and was
52
+ * originally based on software copyright (c) 1999, International
53
+ * Business Machines, Inc., http://www.ibm.com. For more
54
+ * information on the Apache Software Foundation, please see
55
+ * <http://www.apache.org/>.
56
+ */
@@ -0,0 +1,49 @@
1
+ module Blueprint
2
+ # Validates generated CSS against the W3 using Java
3
+ class Validator
4
+ attr_reader :error_count
5
+
6
+ def initialize
7
+ @error_count = 0
8
+ end
9
+
10
+ # Validates all three CSS files
11
+ def validate
12
+ java_path = `which java`.rstrip
13
+ raise "You do not have a Java installed, but it is required." if java_path.blank?
14
+
15
+ output_header
16
+
17
+ Blueprint::CSS_FILES.keys.each do |file_name|
18
+ css_output_path = File.join(Blueprint::BLUEPRINT_ROOT_PATH, file_name)
19
+ puts "\n\n Testing #{css_output_path}"
20
+ puts " Output ============================================================\n\n"
21
+ @error_count += 1 if !system("#{java_path} -jar '#{Blueprint::VALIDATOR_FILE}' -e '#{css_output_path}'")
22
+ end
23
+
24
+ output_footer
25
+ end
26
+
27
+ private
28
+
29
+ def output_header
30
+ puts "\n\n"
31
+ puts " ************************************************************"
32
+ puts " **"
33
+ puts " ** Blueprint CSS Validator"
34
+ puts " ** Validates output CSS files"
35
+ puts " **"
36
+ puts " ************************************************************"
37
+ end
38
+
39
+ def output_footer
40
+ puts "\n\n"
41
+ puts " ************************************************************"
42
+ puts " **"
43
+ puts " ** Done!"
44
+ puts " ** Your CSS files are#{" not" if error_count > 0} valid.#{" You had #{error_count} error(s) within your files" if error_count > 0}"
45
+ puts " **"
46
+ puts " ************************************************************"
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,149 @@
1
+ #!/usr/bin/env ruby
2
+ require File.join(File.dirname(__FILE__), "blueprint", "blueprint")
3
+
4
+ # **Basic
5
+ #
6
+ # Calling this file by itself will pull files from blueprint/src and concatenate them into three files; ie.css, print.css, and screen.css.
7
+ #
8
+ # ruby compress.rb
9
+ #
10
+ # However, argument variables can be set to change how this works.
11
+ #
12
+ # Calling
13
+ #
14
+ # ruby compress.rb -h
15
+ #
16
+ # will reveal basic arguments you can pass to the compress.rb file.
17
+ #
18
+ # **Custom Settings
19
+ #
20
+ # To use custom settings, the file need to be stored in settings.yml within this directory. An example YAML file has been included.
21
+ #
22
+ # Another ability is to use YAML (spec is at http://www.yaml.org/spec/1.1/) for project settings in a predefined structure and
23
+ # store all pertinent information there. The YAML file has multiple keys (usually a named project) with a set of data that defines
24
+ # that project. A sample structure can be found in settings.example.yml.
25
+ #
26
+ # The basic structure is this:
27
+ #
28
+ # Root nodes are project names. You use these when calling compress.rb as such:
29
+ #
30
+ # ruby compress.rb -p PROJECTNAME
31
+ #
32
+ # A sample YAML with only roots and output paths would look like this:
33
+ #
34
+ # project1:
35
+ # path: /path/to/my/project/stylesheets
36
+ # project2:
37
+ # path: /path/to/different/stylesheets
38
+ # project3:
39
+ # path: /path/to/another/projects/styles
40
+ #
41
+ # You can then call
42
+ #
43
+ # ruby compress.rb -p project1
44
+ #
45
+ # or
46
+ #
47
+ # ruby compress.rb -p project3
48
+ #
49
+ # This would compress and export Blueprints CSS to the respective directory, checking for my-(ie|print|screen).css and
50
+ # appending it if present
51
+ #
52
+ # A more advanced structure would look like this:
53
+ #
54
+ # project1:
55
+ # path: /path/to/my/project/stylesheets
56
+ # namespace: custom-namespace-1-
57
+ # custom_css:
58
+ # ie.css:
59
+ # - custom-ie.css
60
+ # print.css:
61
+ # - docs.css
62
+ # - my-print-styles.css
63
+ # screen.css:
64
+ # - subfolder-of-stylesheets/sub_css.css
65
+ # custom_layout:
66
+ # column_count: 12
67
+ # column_width: 70
68
+ # gutter_width: 10
69
+ # project2:
70
+ # path: /path/to/different/stylesheets
71
+ # namespace: different-namespace-
72
+ # custom_css:
73
+ # screen.css:
74
+ # - custom_screen.css
75
+ # semantic_classes:
76
+ # "#footer, #header": column span-24 last
77
+ # "#content": column span-18 border
78
+ # "#extra-content": last span-6 column
79
+ # "div#navigation": last span-24 column
80
+ # "div.section, div.entry, .feeds": span-6 column
81
+ # plugins:
82
+ # - fancy-type
83
+ # - buttons
84
+ # - validations
85
+ # project3:
86
+ # path: /path/to/another/projects/styles
87
+ #
88
+ # In a structure like this, a lot more assignment is occurring. Custom namespaces are being set for two projects, while
89
+ # the third (project3) is just a simple path setting.
90
+ #
91
+ # Also, custom CSS is being used that is appended at the end of its respective file. So, in project1, print.css will have docs.css
92
+ # and my-print-styles.css instead of the default my-print.css. Note that these files are relative to the path that you defined above;
93
+ # you can use subdirectories from the default path if you would like.
94
+ #
95
+ # Another thing to note here is the custom_layout; if not defined, your generated CSS will default to the 24 column, 950px wide grid that
96
+ # has been standard with Blueprint for quite some time. However, you can specify a custom grid setup if you would like. The three options
97
+ # are column_count (the number of columns you want your grid to have), column width (the width in pixels that you want your columns to be), and
98
+ # gutter_width (the width in pixels you want your gutters - space between columns - to be). To use the Blueprint default, do not define this
99
+ # in your settings file.
100
+ #
101
+ # Semantic classes are still in the works within Blueprint, but a simple implementation has been created.
102
+ #
103
+ # Defining semantic_classes, with nodes underneath, will generate a class for each node which has rules of each class assigned to it. For example,
104
+ # in project2 above, for '#footer, #header', elements with id's of footer and header will be assigned all the rules from the
105
+ # classes 'span-24, column, and last', while divs with classes either entry or section, as well as any element with class of feed, is
106
+ # assigned all the rules from 'span-6 and column'. Although it is a crude way do accomplish this, it keeps the generated CSS separate from the core BP CSS.
107
+ #
108
+ # Also supported is plugins. The compressor looks within BLUEPRINT_DIR/blueprint/plugins to match against what's passed. If the plugin name
109
+ # matches, it will append PLUGIN/(screen|print|ie).css to the corresponding CSS file. It will append the plugin CSS to all three CSS files if
110
+ # there is a CSS file present named as the plugin (e.g. the fancy-type plugin with a fancy-type.css file found within the plugin directory)
111
+ #
112
+ # In Ruby, the structure would look like this:
113
+ #
114
+ # {
115
+ # 'project1' => {
116
+ # 'path' => '/path/to/my/project/stylesheets',
117
+ # 'namespace' => 'custom-namespace-1-',
118
+ # 'custom_css' => {
119
+ # 'ie.css' => ['custom-ie.css'],
120
+ # 'print.css' => ['docs.css', 'my-print-styles.css'],
121
+ # 'screen.css' => ['subfolder-of-stylesheets/sub_css.css']
122
+ # },
123
+ # 'custom_layout' => {
124
+ # 'column_count' => 12,
125
+ # 'column_width' => 70,
126
+ # 'gutter_width' => 10
127
+ # }
128
+ # },
129
+ # 'project2' => {
130
+ # 'path' => '/path/to/different/stylesheets',
131
+ # 'namespace' => 'different-namespace-',
132
+ # 'custom_css' => {
133
+ # 'screen.css' => ['custom_screen.css']
134
+ # },
135
+ # 'semantic_classes' => {
136
+ # '#footer, #header' => 'column span-24 last',
137
+ # '#content' => 'column span-18 border',
138
+ # '#extra-content' => 'last span-6 column',
139
+ # 'div#navigation' => 'last span-24 column',
140
+ # 'div.section, div.entry, .feeds' => 'span-6 column'
141
+ # },
142
+ # 'plugins' => ['fancy-type', 'buttons', 'validations']
143
+ # },
144
+ # 'project3' => {
145
+ # 'path' => '/path/to/another/projects/styles'
146
+ # }
147
+ # }
148
+
149
+ Blueprint::Compressor.new.generate!