Skip to content

Commit 0c33a02

Browse files
[_added] springs-adaptor-rebound scaffolding
Summary: I wouldn't normally send `yo` output for review, but since this is a different package, it seemed worthwhile. Since the web is especially sensitive to filesize, keeping dependencies out of the core whenever possible seems like a good move, hence this package. Reviewers: O3 Material JavaScript platform reviewers, #material_motion, O2 Material Motion, featherless Reviewed By: #material_motion, O2 Material Motion, featherless Tags: #material_motion Differential Revision: http://codereview.cc/D2474
1 parent 757ce1d commit 0c33a02

File tree

6 files changed

+172
-0
lines changed

6 files changed

+172
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Material Motion Adaptor for Rebound Springs #
2+
3+
Creates Material Motion springs powered by Rebound
4+
5+
## Usage ##
6+
7+
```javascript
8+
import { springSource } from 'material-motion-springs-adaptor-rebound';
9+
10+
11+
```
12+
13+
See also the [`springSource` specification]() in [the Starmap](https://material-motion.github.io/material-motion/starmap/specifications/streams/sources/SpringSource).
14+
15+
## API ##
16+
17+
To encourage code readability, we follow the named arguments pattern: each function takes a single object literal. Internally, we destructure that object to read a function's arguments.
18+
19+
### `springSource` ###
20+
21+
## Installation ##
22+
23+
```
24+
yarn add material-motion-springs-adaptor-rebound
25+
```
26+
27+
## License ##
28+
29+
[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "material-motion-springs-adaptor-rebound",
3+
"version": "0.0.0",
4+
"description": "Creates Material Motion springs powered by Rebound",
5+
"main": "dist/index.js",
6+
"types": "src/index.ts",
7+
"scripts": {
8+
"lint": "$( yarn bin )/tslint -c ../../tslint.json --project tsconfig.json",
9+
"test": "node ../../tools/test.js --only springs-adaptor-rebound",
10+
"clean": "rm -rf ./dist/*; mkdir -p ./dist/",
11+
"build": "yarn run clean; $( yarn bin )/tsc"
12+
},
13+
"dependencies": {
14+
"tslib": "^1.2.0"
15+
},
16+
"devDependencies": {
17+
"tslint": "4.0.2",
18+
"typescript": "2.1"
19+
},
20+
"repository": {
21+
"type": "git",
22+
"url": "git+ssh://[email protected]:material-motion/material-motion-js.git"
23+
},
24+
"keywords": [
25+
"animation",
26+
"gestures",
27+
"interactive",
28+
"material",
29+
"motion",
30+
"multitouch",
31+
"observables",
32+
"odeon",
33+
"physics",
34+
"rebound",
35+
"springs",
36+
"touch",
37+
"transitions",
38+
"tweens"
39+
],
40+
"author": "The Material Motion Authors (see AUTHORS)",
41+
"license": "Apache-2.0",
42+
"bugs": {
43+
"url": "https://github.com/material-motion/material-motion-js/issues/"
44+
},
45+
"homepage": "https://github.com/material-motion/material-motion-js/tree/develop/packages/springs-adaptor-rebound/#readme"
46+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/** @license
2+
* Copyright 2016 - present The Material Motion Authors. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy
6+
* of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
import { expect } from 'chai';
18+
19+
import {
20+
beforeEach,
21+
describe,
22+
it,
23+
} from 'mocha-sugar-free';
24+
25+
import {
26+
stub,
27+
} from 'sinon';
28+
29+
import springSource from '../springSource';
30+
31+
declare function require(name: string);
32+
33+
// chai really doesn't like being imported as an ES2015 module; will be fixed in v4
34+
require('chai').use(
35+
require('sinon-chai')
36+
);
37+
38+
describe('springSource',
39+
() => {
40+
beforeEach(
41+
() => {
42+
}
43+
);
44+
45+
it('',
46+
() => {
47+
}
48+
);
49+
}
50+
);
51+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/** @license
2+
* Copyright 2016 - present The Material Motion Authors. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy
6+
* of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
export * from './springSource';
18+
export { default as springSource } from './springSource';
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/** @license
2+
* Copyright 2016 - present The Material Motion Authors. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy
6+
* of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
export default function springSource() {
18+
19+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"include": ["./src/**/*"],
4+
"exclude": ["**/*.test.*"],
5+
"compilerOptions": {
6+
"outDir": "dist",
7+
"rootDir": "src"
8+
}
9+
}

0 commit comments

Comments
 (0)