Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 985b9bd

Browse files
authored
Merge pull request #60 from tweenjs/headless-tests
Headless tests and other improvements & fixes
2 parents e6ab3ac + ae4c3c6 commit 985b9bd

File tree

15 files changed

+793
-96
lines changed

15 files changed

+793
-96
lines changed

.babelrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"exclude": ["node_modules/**", "bundles/**", "performance/**", "logo/**", "examples/**"],
3+
"presets": [
4+
[
5+
"@babel/preset-env",
6+
{
7+
"modules": false,
8+
"shippedProposals": true
9+
}
10+
]
11+
],
12+
"plugins": [
13+
"@babel/plugin-proposal-class-properties"
14+
]
15+
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cache:
66
notifications:
77
email: false
88
node_js:
9-
- "8"
9+
- 8
1010
before_install:
1111
- npm i -g npm@^6.0.0
1212
before_script:

README.md

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
We already know what is tweening and why it's need, so there no need to describe it's, Google will do this if you want.
2121
**This library is not made as alternative to another libraries, it's has own pros and cons**
2222

23+
# Docs
24+
25+
* [See docs at GitBook](https://tweenjs.gitbook.io/es6-tween/)
26+
* [Homepage](https://tweenjs.github.io/es6-tween/) (not completed)
27+
* [API documentation](./API.md)
28+
* [Wiki page](https://github.com/tweenjs/es6-tween/wiki)
29+
2330

2431
```javascript
2532
TWEEN.autoPlay(true); // simplify the your code
@@ -142,60 +149,13 @@ Then reference the library source:
142149
* Can also use custom easing functions
143150
* Much of easings
144151

145-
## Compatiblity
146-
All ES5 supported browsers including IE9+
147-
148-
#### Browsers
149-
* Chrome
150-
* Firefox 3.5+
151-
* Opera 9.5+
152-
* IE8+
153-
* Safari 5.1+
154-
155-
#### OS (Fully working)
156-
* Android 4.1+
157-
* iOS6+
158-
* WP8.5+
159-
* OS X
160-
* Windows 7+
161-
162-
#### Device
163-
* iPhone
164-
* iPad
165-
* Android devices
166-
* Nokia Lumia
167-
* Samsung devices
168-
* - all devices should compatible with supported OS
169-
170-
#### Package managers
171-
* `npm`
172-
* `yarn`
173-
174-
#### Bundler
175-
* `Rollup`
176-
177-
#### Transpiler
178-
* `Babel`
179-
180-
## Documentation
181-
182-
* Original source: <a href="https://github.com/tweenjs/tween.js">check out at here</a>
183-
* [Full documentation](https://tweenjs.github.io/es6-tween/)
184-
* [API documentation](./API.md)
185-
* [Wiki page](https://github.com/tweenjs/es6-tween/wiki)
186-
* [Tutorial](https://learningthreejs.com/blog/2011/08/17/tweenjs-for-smooth-animation/) using tween.js with three.js
187-
188152
## Compatiblity Testing
189153

190154
Thanks to BrowserStack for providing us testing in a real devices to make it cross-browser, bug-free and better.
191155
BrowserStack saved my countless hours, before i spent on testing much of time, now it's very easy. I recommend to others use this service.
192156
I sure, BrowserStack helps us to make it, so i am linking to BrowserStack as our sponsor.
193157
[<img src="https://cloud.githubusercontent.com/assets/7864462/12837037/452a17c6-cb73-11e5-9f39-fc96893bc9bf.png" alt="Browser Stack Logo" width="400">](https://www.browserstack.com/)
194158

195-
## Examples
196-
197-
Demos with this version are not yet implemented, sorry.
198-
199159
## Tests
200160

201161
```bash

examples/basic.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<body>
1919
<div class="container">
2020
</div>
21-
<script src="../full/Tween.js"></script>
21+
<script src="../bundled/Tween.js"></script>
2222
<script>
2323

2424
var body = document.body;
@@ -40,7 +40,7 @@
4040
body.textContent = JSON.stringify(object);
4141
}).start();
4242

43-
var tween = new TWEEN.Tween({x:'i am here 600 year'}).to({x:'i am here 200 year'}, 2000).delay(3000).on('update', function (object) {
43+
var tween = new TWEEN.Tween({x:'600 y.o'}).to({x:'200 y.o'}, 2000).delay(3000).on('update', function (object) {
4444
//round(object);
4545
body.textContent = JSON.stringify(object);
4646
}).start();

examples/test.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525

2626
<div id="container"></div>
2727

28-
<script src="../full/Tween.js"></script>
29-
<script src="../../es6-tween-plugins/renderer/render.js"></script>
30-
<script !src="../../es6-tween-plugins/transform/transform.js"></script>
28+
<script src="../bundled/Tween.js"></script>
29+
<script src="https://unpkg.com/[email protected]/render.min.js"></script>
3130
<script>
3231
TWEEN.autoPlay(true);
3332

package.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "es6-tween",
3-
"version": "5.3.2",
3+
"version": "5.4.0",
44
"description": "ES6 implementation of amazing tween.js",
55
"browser": "bundled/Tween.min.js",
66
"cdn": "bundled/Tween.min.js",
@@ -17,7 +17,7 @@
1717
"prepublishOnly": "yarn lint && yarn doc && yarn doc-md",
1818
"doc": "npx jsdoc --readme README.md --configure jsdoc.json --verbose",
1919
"doc-md": "npx jsdoc2md src/** > API.md",
20-
"test": "yarn lint && yarn source && npx ava --verbose",
20+
"test": "yarn lint && npm run source && npx ava",
2121
"lint": "npx eslint ./src",
2222
"lint-fix": "npx eslint ./src --fix"
2323
},
@@ -55,9 +55,22 @@
5555
"husky": "^1.3.1",
5656
"jsdoc": "^3.5.5",
5757
"jsdoc-to-markdown": "^3.1.0-1",
58+
"puppeteer": "^1.12.2",
5859
"rollup": "^1.2.3",
5960
"rollup-plugin-babel": "^4.3.2",
6061
"uglify-js": "^3.4.9"
6162
},
62-
"dependencies": {}
63+
"dependencies": {},
64+
"ava": {
65+
"verbose": true,
66+
"require": [
67+
"esm"
68+
],
69+
"babel": {
70+
"extensions": [
71+
"js",
72+
"mjs"
73+
]
74+
}
75+
}
6376
}

rollup.config.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@ export default {
1010
},
1111
context: 'this',
1212
plugins: [
13-
babel({
14-
babelrc: false,
15-
exclude: ['node_modules/**', 'bundles/**', 'performance/**', 'logo/**', 'examples/**'],
16-
presets: [
17-
[
18-
'@babel/preset-env',
19-
{
20-
modules: false,
21-
shippedProposals: true
22-
}
23-
]
24-
],
25-
plugins: [
26-
'@babel/plugin-proposal-class-properties'
27-
]
28-
})
13+
babel()
2914
]
3015
}

0 commit comments

Comments
 (0)