Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Update README with barebones instructions on how to build
Browse files Browse the repository at this point in the history
JsAction with open-source compiler.

	Change on 2014/05/23 by nnaze <nnaze@google.com>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=67866714
  • Loading branch information
nanaze authored and mknichel committed May 27, 2017
1 parent ca886d5 commit 9a87498
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Expand Up @@ -17,6 +17,34 @@ may late load the implementations, while the app is always able to respond to
user actions marked up through JsAction. This can help in greatly reducing page
load time, in particular for server side rendered apps.

# Building

JsAction is built using the
[Closure Compiler](http://github.com/google/closure-compiler).
You can obtain a recent compiler from the site.

JsAction depends on the
[Closure Library](http://github.com/google/closure-library).
You can obtain a copy of the library from the GitHub repository.

The compiler is able to handle dependency ordering automatically with
the `--only_closure_dependencies` flag. It needs to be provided with
the sources and any entry points.

See the files dispatch_auto.js, eventcontract_auto.js, and
eventcontract_example.js for typical entry points.

Here is a typical command line for building JsAction's dispatch_auto.js:

<pre>
java -jar compiler.jar \
--jsdir=./path/to/closure-library/**.js \
--jsdir=./path/to/jsaction/**.js \
--output_wrapper="(function(){%output%})();" \
--only_closure_dependencies \
--closure_entry_point=jsaction.DispatchAuto
</pre>

# Usage
## In the DOM
Actions are indicated with the `jsaction` attribute. They are separated by `;`,
Expand Down

0 comments on commit 9a87498

Please sign in to comment.