Skip to content

Commit

Permalink
[_added] springs-adaptor-rebound scaffolding
Browse files Browse the repository at this point in the history
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
appsforartists committed Jan 6, 2017
1 parent 757ce1d commit 0c33a02
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/springs-adaptor-rebound/README.md
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)
46 changes: 46 additions & 0 deletions packages/springs-adaptor-rebound/package.json
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"
}
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('',
() => {
}
);
}
);

18 changes: 18 additions & 0 deletions packages/springs-adaptor-rebound/src/index.ts
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';
19 changes: 19 additions & 0 deletions packages/springs-adaptor-rebound/src/springSource.ts
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() {

}
9 changes: 9 additions & 0 deletions packages/springs-adaptor-rebound/tsconfig.json
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"
}
}

0 comments on commit 0c33a02

Please sign in to comment.