Skip to content

Commit

Permalink
Updated README.textile, MIT-LICENSE and CHANGELOG.rdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Engel committed Mar 26, 2011
1 parent 15afda3 commit 080de5c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 32 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rdoc
@@ -1,5 +1,11 @@
= Jzip CHANGELOG

== Version 1.1.0 (March xxx, 2011)

* Replaced jzip.rake with bin/jzip
* Dropped Jeweler
* Using GemSuit for testing

== Version 1.0.11 (November 2, 2010)

* Introduced Jzip::Engine.options[:log_level] which provides control over the Jzip logging (available options are :error, :info, :debug and :console)
Expand Down
2 changes: 1 addition & 1 deletion MIT-LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2010 Paul Engel
Copyright (c) 2011 Paul Engel

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
38 changes: 7 additions & 31 deletions README.textile
@@ -1,11 +1,10 @@

h1. Jzip

A Rails gem (and also plugin) for Javascript merging and compression using templates (like SASS)
A Rails gem for Javascript merging and compression using templates (like SASS)

h2. Introduction

Jzip was created due to the need of simply merging and minifying Javascript files to reduce HTTP requests and file size of my assets. Using sprites for images and SASS for stylesheets only left javascripts not be optimized. AssetPackager almost suited the solution, but I wanted more flexibility in configuration. So with AssetPackager (for minification) and SASS (for merging with templates) as inspiration, I came up with Jzip. At first Jzip was a plugin only, but after refactoring the entire code base, Jzip is also available as a gem hosted on gemcutter.
Jzip was created due to the need of simply merging and minifying Javascript files to reduce HTTP requests and file size of my assets. Using sprites for images and SASS for stylesheets only left javascripts not be optimized. AssetPackager almost suited the solution, but I wanted more flexibility in configuration. So with AssetPackager (for minification) and SASS (for merging with templates) as inspiration, I came up with Jzip. At first Jzip was a plugin only, but after refactoring the entire code base, Jzip is now a gem hosted on gemcutter.

h2. Installation

Expand Down Expand Up @@ -37,23 +36,6 @@ Run the following in your console:
sudo rake gems:install
</pre>

h3. Using Jzip as plugin in Rails 3

<pre>
rails plugin install git://github.com/archan937/jzip.git
</pre>

*Note*: the following will be created at installation of the plugin:

* @assets/jzip@ - which is the default template location
* @assets/jzip/defaults.jz@ - a Jzip template which requires the default Javascript files (Prototype, Scriptaculous and application.js)

h3. Using Jzip as plugin in Rails 2

<pre>
script/plugin install git://github.com/archan937/jzip.git
</pre>

h2. Usage

h3. Including generated Javascript files
Expand Down Expand Up @@ -97,12 +79,6 @@ You probably already have guessed that the default location for Jzip templates i
Jzip::Engine.add_template_location < your_own_template_location(s) >
</pre>

This comes in very handy when building a Rails plugin that uses Jzip because you don't want to copy your all Jzip templates to @RAILS_ROOT/assets/jzip@. So let's say your plugin is called @betty@, all you have to do is put the following in it's @init.rb@ file:

<pre>
Jzip::Engine.add_template_location RAILS_ROOT + "vendor/plugins/betty/assets/jzip"
</pre>

Now isn't that a piece cake? Not only can you pass a @string@ containing the template location, you can also pass an @array of strings@ (containing multiple locations) or a @hash@ (which also specifies the output directory):

* @string@ - target directory will be @public/javascripts@
Expand All @@ -114,13 +90,13 @@ Now isn't that a piece cake? Not only can you pass a @string@ containing the tem
* @array@ - target directory will be @public/javascripts@

<pre>
[RAILS_ROOT + "/some/path/jzip", RAILS_ROOT + "/vendor/plugins/foo/assets/jzip"]
[RAILS_ROOT + "/some/path/jzip", path/to/your/jzip/templates]
</pre>

* @hash@ - target directory will be @public/javascripts/betty@
* @hash@ - target directory will be @public/javascripts/your/target_directory@

<pre>
{RAILS_ROOT + "/vendor/plugins/betty/assets/jzip" => RAILS_ROOT + "/public/javascripts/betty"}
{"path/to/your/jzip/templates" => RAILS_ROOT + "/public/javascripts/your/target_directory"}
</pre>

h3. Compile options
Expand Down Expand Up @@ -173,12 +149,12 @@ None.

h2. License

Copyright (c) 2010 Paul Engel, released under the MIT license
Copyright (c) 2011 Paul Engel, released under the MIT license

"http://holder.nl":http://holder.nl - "http://codehero.es":http://codehero.es - "http://gettopup.com":http://gettopup.com - "http://twitter.com/archan937":http://twitter.com/archan937 - "paul.engel@holder.nl":mailto:paul.engel@holder.nl

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit 080de5c

Please sign in to comment.