Skip to content

Commit

Permalink
Started documenting the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnall committed May 3, 2011
0 parents commit 3e326e5
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
bin/*.js
!bin/*.min.js
17 changes: 17 additions & 0 deletions .project
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>pwnfx_js</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
</natures>
</projectDescription>
20 changes: 20 additions & 0 deletions LICENSE
@@ -0,0 +1,20 @@
Copyright (c) 2011 Victor Costan

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.
62 changes: 62 additions & 0 deletions README
@@ -0,0 +1,62 @@
PwnFX is an attempt to restore Rails 2's ease of sprinkling ajax, using the
UJS (Unobtrusive JavaScript) approach in Rails 3.


REQUIREMENTS

The PwnFX JS has been tested and works against the following browsers:
* Chromium / Google Chrome 11.0+
* Firefox 4.0+
* (TODO) Mobile Safari in iOS 3+
* (TODO) Internet Explorer 9+

Patches for extending compatibility are always welcome.


USAGE

The PwnFX functionality is divided into orthogonal pieces, called effects, which
are activated by HTML5 data- attributes. The attributes for invoking an effect,
such as "move" are prefixed with data-pwnfx-effectname (e.g., data-pwnfx-move).

When using DOM inspectors such as firebug, it might be useful to know that after
parsing, the main attribute for an effect (such as data-pwnfx-move) receives
a -done suffix (e.g., data-pwnfx-move-done), so that the effect is not invoked
again when the DOM is re-parsed.




BUILDING

PwnFX requires RubyGems, Jasmine, and Juicer with the YUI Compressor and
JSLint extensions. Once dependencies are installed, the following command will
build and test both the development and production versions of the library.

rake

The dependencies can be downloaded from the following locations:
* RubyGems -- http://rubygems.org/
* Jasmine -- gem install jasmine
* Juicer -- gem install juicer
* Juicer extensions -- juicer install jslint; juicer install yui_compressor


TESTING

(TODO)

Testing is fully automated using Jasmine. All patches should add tests for the
changed functionality in the spec/ directory.

For maximum iterating speed, keep a Jasmine testing server running.

1. Start the server by running

rake jasmine

2. Make some changes to the source code, then rebuild

rake build

3. Load or refresh http://localhost:8888 in your browser.

0 comments on commit 3e326e5

Please sign in to comment.