Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Prune and Upgrade Dependencies; Add Github Actions #242

Merged
merged 27 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
271e670
Begin excising underscore for vanilla js
zalo Oct 30, 2020
267d338
Eliminate usages of underscore
zalo Oct 31, 2020
f076cd2
Expunge underscore from lib requires
zalo Oct 31, 2020
6b0ffc9
Excise ES5 syntactic sugar to placate UglifyJS
zalo Oct 31, 2020
18d624b
Complete the excision of Underscore.js
zalo Oct 31, 2020
6ea23b1
Update three.js
zalo Oct 31, 2020
8b49725
Update Old Packages
zalo Nov 2, 2020
5575820
Discover `./node_modules/.bin/grunt default`
zalo Nov 2, 2020
1eaf30b
Excise Gestures, Fix Tests
zalo Nov 3, 2020
c6d2ad0
Fix running tests
zalo Nov 3, 2020
8eb980a
Fix non-browser tests too
zalo Nov 3, 2020
040f3f6
Add Github Action for Building Library/Running Tests
zalo Nov 3, 2020
4d74c9e
Build leapjs
actions-user Nov 3, 2020
8a9873d
See if errors can be suppressed...
zalo Nov 3, 2020
2e03509
Merge branch 'update-2020' of https://github.com/leapmotion/leapjs in…
zalo Nov 3, 2020
ce3db33
Suppress Pushing Errors again...
zalo Nov 3, 2020
874aecc
Mostly remove tools
zalo Nov 9, 2020
1c767be
Finish excising Tool Objects
zalo Nov 9, 2020
e60d3d5
Build Leap.js
actions-user Nov 9, 2020
ee9cd4e
Fix half of the npm audit issues...
zalo Nov 9, 2020
48721d2
Merge branch 'update-2020' of https://github.com/leapmotion/leapjs in…
zalo Nov 9, 2020
eaa2051
Fix all npm package vulnerabilities
zalo Nov 9, 2020
a62f77a
Build Leap.js
actions-user Nov 9, 2020
835f910
Cleanup test browser.html for mocha-chrome-headless
RecursiveCptHook Nov 19, 2020
0e0e13d
Updated package-lock from clean install
RecursiveCptHook Nov 19, 2020
312ea67
Updated leap.js build outputs
RecursiveCptHook Nov 19, 2020
dad1d3b
Merge pull request #244 from leapmotion/update-2020-tweaks
zalo Nov 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: leapjs - Build Library and Run Unit Tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍


on: [push, pull_request]

jobs:
build:
name: Build Library and Run Unit Tests
runs-on: ubuntu-latest
steps:

# Checkout
- name: Checkout repository
uses: actions/checkout@v2

# Install Node
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'

# Install Dependencies
- name: Install NPM Dependencies
run: npm ci

# Build and Run Tests
- name: Build Library and Run Tests
run: ./node_modules/.bin/grunt test

# Commit All Build Artifacts
- name: Commit Build Artifacts
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
set +e
git add *
git diff-index --quiet HEAD || git commit -m "Build Leap.js"

# Push Build Artifacts
- name: Push Changes to branch
id: push-build
uses: ad-m/github-push-action@master
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

# Reenable Errors
- name: Clean Up
if: steps.push-build.outcome == 'success' && steps.push-build.conclusion == 'success'
run: set -e
6 changes: 3 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(grunt){
\n * LeapJS v<%= pkg.version %> \
\n * http://github.com/leapmotion/leapjs/ \
\n * \
\n * Copyright 2013 LeapMotion, Inc. and other contributors \
\n * Copyright 2020 Ultraleap, Inc. and other contributors \
\n * Released under the Apache-2.0 license \
\n * http://github.com/leapmotion/leapjs/blob/master/LICENSE \
\n */";
Expand Down Expand Up @@ -95,9 +95,9 @@ module.exports = function(grunt){

},
exec: {
'test-browser': './node_modules/.bin/mocha-chrome -R dot test/helpers/browser.html',
'test-browser': '"./node_modules/.bin/mocha-headless-chrome" -r dot -f test/helpers/browser.html',
// -i -g stands for inverse grep. Tests tagged browser-only will be excluded.
'test-node': './node_modules/.bin/mocha lib/index.js test/helpers/node.js test/*.js -R dot -i -g browser-only',
'test-node': '"./node_modules/.bin/mocha" lib/index.js test/helpers/node.js test/*.js -R dot -i -g browser-only',
'test-integration': 'node integration_test/reconnection.js && node integration_test/protocol_versions.js'
}
});
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test: build test-only
test-only: test-node test-browser test-integration

test-browser:
./node_modules/.bin/mocha-chrome -R dot test/helpers/browser.html
"./node_modules/.bin/mocha-headless-chrome" -r dot -f test/helpers/browser.html

test-node:
./node_modules/.bin/mocha lib/index.js test/helpers/node.js test/*.js -R dot
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "leapjs",
"version": "1.0.0",
"version": "1.1.0",
"homepage": "https://github.com/leapmotion/leapjs",
"description": "JavaScript client for the Leap Motion Controller",
"main": "leap-1.0.0.js",
"main": "leap-1.1.0.js",
"keywords": [
"leap",
"leapmotion",
Expand Down
2 changes: 1 addition & 1 deletion examples/css-visualizer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>DOM Visualizer - Leap</title>
<script src="../leap-1.0.0.js"></script>
<script src="../leap-1.1.0.js"></script>
<script>
function moveFinger(Finger, posX, posY, posZ) {
Finger.style.webkitTransform = "translate3d("+posX+"px, "+posY+"px, "+posZ+"px)";
Expand Down
2 changes: 1 addition & 1 deletion examples/dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
</style>
-->
<script src="../leap-1.0.0.js"></script>
<script src="../leap-1.1.0.js"></script>
<script>

var controller = (new Leap.Controller);
Expand Down
4 changes: 2 additions & 2 deletions examples/dumper.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>Dumper - Leap</title>
<script src="../leap-1.0.0.js"></script>
<script src="../leap-1.1.0.js"></script>
<script>
console.log("LeapJS v" + Leap.version.full);
var state = 'play';
Expand All @@ -15,7 +15,7 @@
}
};
var haveLoggedFrame = false;
var controller = new Leap.Controller({enableGestures: true});
var controller = new Leap.Controller();
controller.loop(function(frame) {
if (state == 'paused') return;
if (state == 'pausing') {
Expand Down
99 changes: 0 additions & 99 deletions examples/gestures.html

This file was deleted.

2 changes: 1 addition & 1 deletion examples/iframe.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>iFrame - Leap</title>
<script src="../leap-1.0.0.js"></script>
<script src="../leap-1.1.0.js"></script>
</head>
<body>
<!-- Demonstrates https://github.com/leapmotion/leapjs/issues/176 -->
Expand Down
3 changes: 1 addition & 2 deletions examples/lib/leap-plugins-0.1.6.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ function Recording (options){
'id',
'timestamp',
// this should be replace/upgraded with a whitelist instead of a blacklist.
// leaving out r,s,y, and gestures
// leaving out r,s,y
{hands: [[
'id',
'type',
Expand Down Expand Up @@ -1699,7 +1699,6 @@ Recording.prototype = {
finalFrame.hands = [];
finalFrame.fingers = [];
finalFrame.pointables = [];
finalFrame.tools = [];
this.sendImmediateFrame(finalFrame);
},

Expand Down
Loading