UNPKG

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