Permalink
Browse files

Adding minified version of library and how to produce it

  • Loading branch information...
1 parent e1582cf commit 458c20e9a56c9505a4598c1f9fa46a3a9de081bd @davidjb committed Dec 10, 2012
View
@@ -5,7 +5,9 @@ Changelog
2.1 (unreleased)
================
-- Nothing changed yet.
+- Add minified versions of library and extensions and details how to produce
+ minified versions.
+ [davidjb]
2.0 (2012-12-07)
View
@@ -6,7 +6,8 @@ Introduction
This library packages `CSS3 GitHub Buttons`_ for `fanstatic`_. Check out
a `demo`_ of this library - it's really nice. This library provides
-the default buttons and various extensions as per the demo.
+the default buttons and various extensions as per the demo. As a bonus, this
+library also packages up minified versions of the library's CSS.
There's a *lot* of versions of this CSS library floating around,
so we're currently using the one provided by ``CodeFusion``, a fork
@@ -65,8 +66,20 @@ Updating this package
=====================
Given this package uses the latest (at the time of writing) GitHub master
-of the CSS library, it may (will) need updating at some point. Do this
-at the base of the repository::
+of the CSS library, it may (will) need updating at some point.
+
+This process requires installation of the package for development - the
+suggested method to do this is via the Buildout within this package::
+
+ cd css.css3githubbuttons
+ python boostrap.py
+ ./bin/buildout
+
+For minification of resources to succeed, you require a Java installation
+as this process uses the YUI Compressor library (via the ``minify``
+and ``yuicompressor`` Python packages).
+
+Do this at the base of the repository::
pushd css/css3githubbuttons/resources
wget https://github.com/CodeFusion/css3-github-buttons/archive/master.tar.gz
@@ -76,6 +89,10 @@ at the base of the repository::
git mv css3-github-buttons-master css3-github-buttons
git add css3-github-buttons
popd
+ #Minify the CSS
+ python setup.py minify_buttons
+ python setup.py minify_buttons_ext_icons
+ python setup.py minify_buttons_ext_size
git commit -a -m "Updated to latest version"
git push
@@ -9,14 +9,17 @@
)
buttons = Resource(library,
- 'gh-buttons.css'
+ 'gh-buttons.css',
+ minified='gh-buttons.min.css'
)
buttons_ext_sizes = Resource(library,
'ext_button_size/gh-buttons_size.css',
+ minified='ext_button_size/gh-buttons_size.min.css',
depends=(buttons,)
)
buttons_ext_icons = Resource(library,
'ext_button_icons/gh-buttons_ext_icons.css',
+ minified='ext_button_icons/gh-buttons_ext_icons.min.css',
depends=(buttons,)
)
buttons_ext_all = Group([buttons_ext_sizes, buttons_ext_icons])

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,5 @@
+[aliases]
+minify_buttons = minify_css --charset utf-8 --sources 'css/css3githubbuttons/resources/css3-github-buttons/gh-buttons.css' --output 'css/css3githubbuttons/resources/css3-github-buttons/%s.min.css'
+minify_buttons_ext_icons = minify_css --charset utf-8 --sources 'css/css3githubbuttons/resources/css3-github-buttons/ext_button_icons/gh-buttons_ext_icons.css' --output 'css/css3githubbuttons/resources/css3-github-buttons/ext_button_icons/%s.min.css'
+minify_buttons_ext_size = minify_css --charset utf-8 --sources 'css/css3githubbuttons/resources/css3-github-buttons/ext_button_size/gh-buttons_size.css' --output 'css/css3githubbuttons/resources/css3-github-buttons/ext_button_size/%s.min.css'
+
View
@@ -43,6 +43,7 @@ def read(*rnames):
],
setup_requires=[
'setuptools-git',
+ 'minify',
],
entry_points={
'fanstatic.libraries': [

0 comments on commit 458c20e

Please sign in to comment.