1 | # Flux Viewport
|
2 |
|
3 | ## Tutorial
|
4 | The [git book](https://flux.gitbooks.io/flux-javascript-sdk/content/) documenting the Flux JavaScript SDK, has a good introduction to using the [Flux Viewport](https://flux.gitbooks.io/flux-javascript-sdk/content/tutorial/Chapter-2.html).
|
5 |
|
6 | ## Sample Project
|
7 | Several projects in [Flux Labs](https://github.com/flux-labs) use the Flux Viewport. If you want a simple one try the [Flux Seed](https://github.com/flux-labs/flux-seed) starter project.
|
8 |
|
9 | ## API Reference Documentation
|
10 | For a complete list of functions see the [API Reference](https://flux-viewport-reference.herokuapp.com)
|
11 |
|
12 | ## Developers
|
13 | Make sure you have node version 4+
|
14 |
|
15 | npm install
|
16 |
|
17 | python -m SimpleHTTPServer 8001
|
18 |
|
19 | Different usage examples are available, navigate to the appropriate url.
|
20 |
|
21 | Basic Demo - Use this see an example of how the viewport can be used in a web page.
|
22 | http://localhost:8001/demo/basic.html
|
23 |
|
24 | Advanced Demo - This example shows how to make a page with multiple viewports.
|
25 | http://localhost:8001/demo/advanced.html
|
26 |
|
27 | QA - Use this page load the image diffing app.
|
28 | http://localhost:8001/qa/
|
29 |
|
30 | ### Extended Developer Setup
|
31 |
|
32 | If you want to contribute changes to the viewport code base please email support@flux.io and introduce yourself.
|
33 |
|
34 | To setup gerrit for code review run the following commands.
|
35 | ```
|
36 | # Update remotes
|
37 | git remote rename origin bitbucket
|
38 | git remote add gerrit ssh://${USER}@cr.flux.io:29418/flux-viewport
|
39 |
|
40 | # Add Commit hook
|
41 | curl https://cr.flux.io/tools/hooks/commit-msg > `git rev-parse --git-dir`/hooks/commit-msg
|
42 | chmod +x `git rev-parse --git-dir`/hooks/commit-msg
|
43 | ```
|
44 | If you are working in Flux genie follow the instructions here (Flux Employees Only):
|
45 | https://docs.google.com/document/d/1qf6PGJN54buSGFcrcRCZnruY4yTAsNRzoMtEpyE2VFY/edit#heading=h.owqmh4p4ruch
|