You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@senssoft.apache.org by rf...@apache.org on 2018/04/13 18:40:26 UTC
[05/13] incubator-senssoft-useralejs git commit: SENSSOFT-250 Create
README for UserALE.js examples directory
SENSSOFT-250 Create README for UserALE.js examples directory
Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/commit/937863f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/tree/937863f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/diff/937863f8
Branch: refs/heads/SENSSOFT-192
Commit: 937863f896279e689cecca29f3f71ef604af5c44
Parents: fb3d2f5 7c5b2be
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Fri Jan 26 11:01:28 2018 -0800
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Fri Jan 26 11:01:28 2018 -0800
----------------------------------------------------------------------
KEYS | 76 +++++++++
LICENSE | 402 +++++++++++++++++++++++------------------------
NOTICE | 2 +-
README.md | 1 +
doap-userale.js.rdf | 2 +-
example/README.md | 2 +-
example/index.html | 2 +-
example/server.js | 2 +-
8 files changed, 283 insertions(+), 206 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/937863f8/README.md
----------------------------------------------------------------------
diff --cc README.md
index 59b69e0,b94821e..645d791
--- a/README.md
+++ b/README.md
@@@ -7,22 -7,6 +7,23 @@@ The official JavaScript client for [Apa
Additional documentation can be found at http://senssoft.incubator.apache.org/userale/
+## Prerequsites
+
+```
+npm install gulp
+npm install del
+npm install gulp-eslint
+npm install rollup
+npm install rollup-plugin-json
+npm install gulp-uglify
+npm install gulp-rename
+npm install gulp-mocha
+npm install babel-register
+npm install express
+npm install body-parser
++npm install nodemon
+```
+
## Build
To build UserALE.js:
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/937863f8/example/README.md
----------------------------------------------------------------------
diff --cc example/README.md
index fcc9b81,0000000..a0fb452
mode 100644,000000..100644
--- a/example/README.md
+++ b/example/README.md
@@@ -1,68 -1,0 +1,68 @@@
+# UserALE.js Example
+
+This directory provides
+ * example usage for UserALE.js within a simple HTML Webpage,
+ * how users can expect to log UserALE events, and
+ * what log events looks like within a simple UserALE logging server.
+
+## Prerequisites
+
+Please see the [Prerequsites](https://github.com/apache/incubator-senssoft-useralejs#prerequsites)
+
+## Running the Logging Server
+
+Assuming you have [node.js](https://nodejs.org/) installed, simply run
+
+```
- node server.js
++npm run example:watch
+```
+
+## Running the Example
+
+Simply open index.html in your browser... you will see a very simply HTML Webpage with a button.
+
+When you click the button, the events will be logged to the server (in memory), logs looks similar to the following
+
+```
+
+[ { target: 'body',
+ path: [ 'body', 'html' ],
+ clientTime: 1504287557492,
+ location: { x: 0, y: 0 },
+ type: 'keydown',
+ userAction: true,
+ details: null,
+ userId: 'example-user',
+ toolVersion: '1.0.0',
+ toolName: 'Apache UserALE.js Example',
+ useraleVersion: '1.0.0' },
+ { target: '#document',
+ path: [ '#document' ],
+ clientTime: 1504287558304,
+ location: { x: 0, y: 0 },
+ type: 'blur',
+ userAction: true,
+ details: { window: true },
+ userId: 'example-user',
+ toolVersion: '1.0.0',
+ toolName: 'Apache UserALE.js Example',
+ useraleVersion: '1.0.0' },
+ { target: '#document',
+ path: [ '#document' ],
+ clientTime: 1504287558304,
+ location: { x: 0, y: 0 },
+ type: 'blur',
+ userAction: true,
+ details: null,
+ userId: 'example-user',
+ toolVersion: '1.0.0',
+ toolName: 'Apache UserALE.js Example',
+ useraleVersion: '1.0.0' },
+ ...
+]
+
+```
+
+## Contributing
+
+Contributions are welcome! Simply [submit an issue report](https://issues.apache.org/jira/browse/senssoft) for problems you encounter or a pull request for your feature or bug fix. The core team will review it and work with you to incorporate it into UserALE.js.
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/937863f8/example/index.html
----------------------------------------------------------------------
diff --cc example/index.html
index d293675,d7cd66a..4849b9f
--- a/example/index.html
+++ b/example/index.html
@@@ -18,7 -18,7 +18,7 @@@ limitations under the License
<head>
<title>UserAleJS - Example Page</title>
<script
- src="../build/userale-1.0.0.min.js"
- src="build/userale-0.2.1.min.js"
++ src="build/userale-1.0.0.min.js"
data-url="http://localhost:8000/"
data-user="example-user"
data-version="1.0.0"
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/937863f8/example/server.js
----------------------------------------------------------------------
diff --cc example/server.js
index 8362123,354219e..5d5cc63
--- a/example/server.js
+++ b/example/server.js
@@@ -58,7 -58,7 +58,7 @@@ app.set('view engine', 'jade')
app.get('/', function (req, res) {
-- res.sendfile('index.html', { root: __dirname });
++ res.sendFile('index.html', { root: __dirname });
});
app.post('/', function (req, res) {