Skip to content

Commit

Permalink
update README . recompile minified version
Browse files Browse the repository at this point in the history
  • Loading branch information
house9 committed Jul 26, 2011
1 parent 172456f commit 1efcc97
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

*.pnproj
.bundle
_preview_README.html

1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ source 'http://rubygems.org'

gem "uglifier"
gem "jslint", "~> 1.1.1"
gem "kramdown"
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ GEM
jslint (1.1.1)
json
json (1.5.3)
kramdown (0.13.3)
multi_json (1.0.3)
uglifier (1.0.0)
execjs (>= 0.3.0)
Expand All @@ -16,4 +17,5 @@ PLATFORMS

DEPENDENCIES
jslint (~> 1.1.1)
kramdown
uglifier
21 changes: 19 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ See specific license for any other code included, i.e. jquery

* added the ability to pass in a callback function


1.0.0 / 2010-10-22 / Initial release

* converted code to plugin
Expand All @@ -87,9 +86,27 @@ See specific license for any other code included, i.e. jquery

## TODO List:

* run jslint
* more testing

## Patches:

if you have ruby installed you might want to utilize some of these tools,
first run `bundle` to install needed gems

webrick for testing webkit browsers, using localhost and file:/// are problematic,
instead fire up webrick use your local machines ip address and any port you want

`ruby webrick.rb --port 3333 --bind 192.168.0.5`

jslint checking, currently there is 1 error and it has a comment on that line // fails jslint

`jslint js/jquery.iframe-auto-height.plugin.js`

minify the library, first bump the version number in minify.rb then run the script,
this will drop the new minified file into the release directory

`ruby minify.rb`


## Issues

Expand Down
8 changes: 8 additions & 0 deletions compile_readme.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'rubygems'
require 'kramdown'

input = File.read("README.markdown")
html = Kramdown::Document.new(input).to_html
File.open("_preview_README.html", 'w') { |f| f.write(html) }

puts "preview created: open _preview_README.html in browser"
4 changes: 2 additions & 2 deletions minify.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rubygems'
require 'uglifier'

JQUERY_IFRAME_AUTO_HEIGHT_VERSION = "1.4.0"
JQUERY_IFRAME_AUTO_HEIGHT_VERSION = "1.4.1"

puts " "
puts "Minify for version #{JQUERY_IFRAME_AUTO_HEIGHT_VERSION}"
Expand All @@ -12,7 +12,7 @@

input = File.read(source_file_name)
uglified = Uglifier.new({:copyright => false}).compile(input)
File.open(output_file_name, 'w') { |f| f.write("#{intro}\n#{uglified}") }
File.open(output_file_name, 'w') { |f| f.write("#{intro}\n#{uglified}; ") }

puts " created #{output_file_name}"
puts "Done"
5 changes: 5 additions & 0 deletions release/jquery.iframe-auto-height.plugin.1.4.1.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webrick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Parse options
optparse = OptionParser.new do|opts|
opts.banner = "Usage: websrv.rb [options]"
opts.banner = "Usage: websrv.rb [options]"

options[:port] = 3000
opts.on( '-p', '--port PORT', 'Port Number (default 3000)' ) do |port|
Expand Down

0 comments on commit 1efcc97

Please sign in to comment.