-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[_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
- Loading branch information
1 parent
757ce1d
commit 0c33a02
Showing
6 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Material Motion Adaptor for Rebound Springs # | ||
|
||
Creates Material Motion springs powered by Rebound | ||
|
||
## Usage ## | ||
|
||
```javascript | ||
import { springSource } from 'material-motion-springs-adaptor-rebound'; | ||
|
||
|
||
``` | ||
|
||
See also the [`springSource` specification]() in [the Starmap](https://material-motion.github.io/material-motion/starmap/specifications/streams/sources/SpringSource). | ||
|
||
## API ## | ||
|
||
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. | ||
|
||
### `springSource` ### | ||
|
||
## Installation ## | ||
|
||
``` | ||
yarn add material-motion-springs-adaptor-rebound | ||
``` | ||
|
||
## License ## | ||
|
||
[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "material-motion-springs-adaptor-rebound", | ||
"version": "0.0.0", | ||
"description": "Creates Material Motion springs powered by Rebound", | ||
"main": "dist/index.js", | ||
"types": "src/index.ts", | ||
"scripts": { | ||
"lint": "$( yarn bin )/tslint -c ../../tslint.json --project tsconfig.json", | ||
"test": "node ../../tools/test.js --only springs-adaptor-rebound", | ||
"clean": "rm -rf ./dist/*; mkdir -p ./dist/", | ||
"build": "yarn run clean; $( yarn bin )/tsc" | ||
}, | ||
"dependencies": { | ||
"tslib": "^1.2.0" | ||
}, | ||
"devDependencies": { | ||
"tslint": "4.0.2", | ||
"typescript": "2.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com:material-motion/material-motion-js.git" | ||
}, | ||
"keywords": [ | ||
"animation", | ||
"gestures", | ||
"interactive", | ||
"material", | ||
"motion", | ||
"multitouch", | ||
"observables", | ||
"odeon", | ||
"physics", | ||
"rebound", | ||
"springs", | ||
"touch", | ||
"transitions", | ||
"tweens" | ||
], | ||
"author": "The Material Motion Authors (see AUTHORS)", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/material-motion/material-motion-js/issues/" | ||
}, | ||
"homepage": "https://github.com/material-motion/material-motion-js/tree/develop/packages/springs-adaptor-rebound/#readme" | ||
} |
51 changes: 51 additions & 0 deletions
51
packages/springs-adaptor-rebound/src/__tests__/springSource.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** @license | ||
* Copyright 2016 - present The Material Motion Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { expect } from 'chai'; | ||
|
||
import { | ||
beforeEach, | ||
describe, | ||
it, | ||
} from 'mocha-sugar-free'; | ||
|
||
import { | ||
stub, | ||
} from 'sinon'; | ||
|
||
import springSource from '../springSource'; | ||
|
||
declare function require(name: string); | ||
|
||
// chai really doesn't like being imported as an ES2015 module; will be fixed in v4 | ||
require('chai').use( | ||
require('sinon-chai') | ||
); | ||
|
||
describe('springSource', | ||
() => { | ||
beforeEach( | ||
() => { | ||
} | ||
); | ||
|
||
it('', | ||
() => { | ||
} | ||
); | ||
} | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** @license | ||
* Copyright 2016 - present The Material Motion Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export * from './springSource'; | ||
export { default as springSource } from './springSource'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** @license | ||
* Copyright 2016 - present The Material Motion Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export default function springSource() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["./src/**/*"], | ||
"exclude": ["**/*.test.*"], | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
} | ||
} |