Skip to content

Commit

Permalink
rakefile, jsmin, gz
Browse files Browse the repository at this point in the history
  • Loading branch information
osteele committed Nov 11, 2007
1 parent 85ada73 commit bbcc3bb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
22 changes: 22 additions & 0 deletions functional/Rakefile
@@ -0,0 +1,22 @@
MIN = 'functional.min.js'
PACKAGE = 'functional-1.0.2.tgz'
SOURCES = %w[CHANGES MIT-LICENSE examples.js functional.js to-function.js]

task :default => [MIN+'.gz', PACKAGE]

task :publish do
sh "rsync -avzP . osteele.com:osteele.com/sources/javascript/functional --delete"
end

file PACKAGE => SOURCES do |t|
sh "tar cfz #{t.name} #{t.prerequisites}"
end

file 'functional.min.js' => %w[functional.js to-function.js] do |t|
sh "cat #{t.prerequisites} | ruby ~/src/javascript/jsmin.rb > #{t.name}"
end

file MIN+'.gz' => MIN do |t|
sh "gzip < #{t.prerequisites} > #{t.name}"
puts "#{File.size(t.name)} bytes"
end
2 changes: 0 additions & 2 deletions functional/agenda.txt
@@ -1,8 +1,6 @@
This release:
- fix Array.slice technique
- add caching version
- jsmin version
- different download options

Future:
- clone to separate repository
Expand Down
18 changes: 10 additions & 8 deletions functional/index.html
Expand Up @@ -4,8 +4,8 @@
<title>Functional Javascript</title>
<script type="text/javascript" src="/javascripts/prototype.js"></script>
<script type="text/javascript" src="../gradients.js"></script>
<script type="text/javascript" src="functional.js"></script>
<script type="text/javascript" src="to-function.js"></script>
<script type="text/javascript" src="functional.min.js"></script>
<!-- <script type="text/javascript" src="to-function.js"></script> -->
<script type="text/javascript" src="../osdoc/Base.js"></script>
<script type="text/javascript" src="../osdoc/osdoc.js"></script>
<script type="text/javascript" src="evaluator.js"></script>
Expand Down Expand Up @@ -48,7 +48,9 @@ <h1>Functional Javascript</h1>
<input type="checkbox" id="header-toggle" value="on" checked="checked"/> header
| <a href="http://osteele.com/archives/2007/07/functional-javascript">announcement</a>
| <a href="http://code.google.com/p/functional-javascript/">project page</a>
| <a href="functional.js">view/download source</a>
| download:
<a href="functional.min.js.gz">runnable (<3K min gz)</a>
| <a href="functional.src.gz">source</a>
</div>
<div id="ie-warning" style="display:none">
<a class="close" href="#">close</a>
Expand Down Expand Up @@ -76,7 +78,7 @@ <h1>Functional Javascript</h1>
as <code>'x -> x+1'</code>, <code>'x+1'</code>, or
<code>'+1'</code> as synonyms for the more verbose
<code>function(x) {return x+1}</code>.</p>

<div style="float:left; margin-right:5em">
<p><dfn>Functional</dfn> supports <a href="http://en.wikipedia.org/wiki/Higher-order_programming">higher-order programming</a>:</p>
<pre class="example">
Expand Down Expand Up @@ -104,12 +106,12 @@ <h1>Functional Javascript</h1>
</div>
<div style="clear:left"> </div>
</div>

<div id="evaluator" style="display:none">
<p>Try it! Enter an expression below, or click on a line of
code (from the examples above or the documentation below) to
copy it here.</p>
<div class="content">
<div class="content">
<div class="input-column">
<pre class="transcript"></pre>
<textarea class="current" rows="1" cols="40">map('1+', [2, 3])</textarea><br/>
Expand All @@ -127,11 +129,11 @@ <h1>Functional Javascript</h1>
<input class="toggle" type="checkbox"/>show <span class="count"> </span>
<input class="clear" type="button" value="clear"/>
</div>
</div>
</div>
</div>
<hr/>
</div>

<div id="noscript">
<span class="initial">You either have JavaScript turned off or
you're using an unsupported browser. Either way, </span>
Expand Down

0 comments on commit bbcc3bb

Please sign in to comment.