udon

所属分类:collect
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2012-08-29 14:41:50
上 传 者sh-1993
说明:  JavaScript中的实用函数编程,
(Practical functional programming in JavaScript,)

文件列表:
.npmignore (31, 2012-08-29)
CHANGELOG (721, 2012-08-29)
LICENSE (1458, 2012-08-29)
jake.yml (314, 2012-08-29)
package.json (534, 2012-08-29)
site/ (0, 2012-08-29)
site/css/ (0, 2012-08-29)
site/css/docs.css (2773, 2012-08-29)
site/downloads/ (0, 2012-08-29)
site/downloads/udon-1.0.0-min.js (1714, 2012-08-29)
site/downloads/udon-1.0.0.js (2804, 2012-08-29)
site/downloads/udon-1.1.0-min.js (2110, 2012-08-29)
site/downloads/udon-1.1.0.js (3372, 2012-08-29)
site/downloads/udon-1.2.0-min.js (2915, 2012-08-29)
site/downloads/udon-1.2.0.js (4598, 2012-08-29)
site/index.md (12891, 2012-08-29)
site/site.hs (698, 2012-08-29)
site/templates/ (0, 2012-08-29)
site/templates/default.html (612, 2012-08-29)
src/ (0, 2012-08-29)
src/udon.js (11294, 2012-08-29)
tasks/ (0, 2012-08-29)
tasks/deploy (117, 2012-08-29)
test/ (0, 2012-08-29)
test/browser.html (320, 2012-08-29)
test/console.js (299, 2012-08-29)
test/run.js (373, 2012-08-29)
test/specs/ (0, 2012-08-29)
test/specs/udon_spec.js (39012, 2012-08-29)
vendor/ (0, 2012-08-29)
vendor/jsclass/ (0, 2012-08-29)
vendor/jsclass/assets/ (0, 2012-08-29)
vendor/jsclass/assets/bullet_go.png (410, 2012-08-29)
vendor/jsclass/assets/testui.css (3686, 2012-08-29)
vendor/jsclass/benchmark.js (1084, 2012-08-29)
vendor/jsclass/benchmark.js.map (1416, 2012-08-29)
vendor/jsclass/command.js (1497, 2012-08-29)
vendor/jsclass/command.js.map (1762, 2012-08-29)
... ...

Udon ==== Functional programming has a number of common, idiomatic operations: maps, folds, currying and so on. There are a number of excellent JavaScript libraries which provide access to these fundamentals in a more-or-less functional style. [Ojay]'s core extensions, Oliver Steele's [Functional] and Jeremy Ashkenas' [Underscore] are all good examples. [Udon] is cast in a similar mould to the above. It aims to provide basic support for functional programming in JavaScript, initially by porting some elements of Haskell's `Data.List` library. [Udon]: http://extralogical.net/projects/udon/ [Ojay]: http://ojay.othermedia.org/ [Underscore]: http://documentcloud.github.com/underscore/ [Functional]: http://osteele.com/sources/javascript/functional/ Installing Udon --------------- Udon is available from [npm], so if you want to use Udon with [Node] you can just run the following command to globally install the library. npm install -g udon Then it's just a matter of requiring it in your Node project. The module exported by the library is just the top-level Udon object. var Udon = require('udon'); Udon.sum([1, 2, 3, 4]); // -> 10 Otherwise, you can grab pre-built versions from the [Udon website][Udon] or build it yourself as described below. [npm]: http://npmjs.org/ [Node]: http://nodejs.org/ Building the library -------------------- If you've checked out the Git repository and want to build a minified version of the library from source, you will need [Ruby], [Rubygems] and the [Jake] gem, which you can get by running (with `sudo` if you like) gem install jake from the command line. Then just `cd` into your Udon directory and run jake which will build the library in the `/pkg` directory. [Ruby]: http://ruby-lang.org [Rubygems]: http://rubygems.org [Jake]: https://github.com/jcoglan/jake Deploying with Helium --------------------- Udon includes a `jake.yml` file for use with the Jake build tool, as explained above. This also means that it is easily deployed with [Helium], a Git-backed JavaScript package server. It should also fit into any other build or deploy system based on [JS.Packages]. [Helium]: https://github.com/othermedia/helium [JS.Packages]: http://jsclass.jcoglan.com/packages.html Running the test suite ---------------------- The Udon test suite is written with the [JS.Test] testing framework. The test suite runs on several JavaScript platforms, including [Node] and all modern web browsers. To run the test suite from the command line, run the following command (replacing `node` with [Rhino], [V8] etc. where relevant). node test/console.js To run the test suite in a browser, open the `test/browser.html` file in a web browser. [JS.Test]: http://jsclass.jcoglan.com/testing.html [Node]: http://nodejs.org [Rhino]: http://www.mozilla.org/rhino/ [V8]: http://code.google.com/p/v8/ Building the Udon website ------------------------- The website is built with [Hakyll], a static site generator written in [Haskell]. To build it you will need [GHC] and [cabal-install]; the simplest way to get hold of these is to install the [Haskell Platform]. You'll also need to install the `hakyll` package from [Hackage]: cabal install hakyll Then, to build the site, just run this from your Udon directory: ghc --make -Wall site/site [Hakyll]: http://jaspervdj.be/hakyll/ [Haskell]: http://www.haskell.org [GHC]: http://www.haskell.org/ghc/ [cabal-install]: http://www.haskell.org/cabal/download.html [Haskell Platform]: http://hackage.haskell.org/platform/ [Hackage]: http://hackage.haskell.org/

近期下载者

相关文件


收藏者