Skip to content

Commit

Permalink
[added] yarn run ci
Browse files Browse the repository at this point in the history
Summary:
I checked out a fresh copy of the repo to ensure that it could pass CI.  Here are the changes I made:

- Moved the CI scripts from .travis.yml to package.json for consistency.  It's nice to be able to type `yarn run ci` to run the same suite as Travis.
- Ran `build` before `test`, to ensure any intra-repo dependencies are available in the dist folder for their siblings, as prescribed in package.json.  If we had something like typescript:main, we could skip this step (microsoft/TypeScript#12561).
- Fixed all the errors the linter complained about.  Since a few packages were written before the linter existed, there were conflicts between their style and its.

Reviewers: O3 Material JavaScript platform reviewers, #material_motion, O2 Material Motion, markwei

Reviewed By: #material_motion, O2 Material Motion, markwei

Tags: #material_motion

Differential Revision: http://codereview.cc/D2395
  • Loading branch information
appsforartists committed Dec 20, 2016
1 parent 6374f33 commit 0e7a581
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 36 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ addons:
before_script:
- yarn run bootstrap
script:
- yarn run test -- --single-run
- yarn run build
- yarn run ci
group: stable
os: linux
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"bootstrap": "yarn; $( yarn bin )/lerna bootstrap",
"build": "$( yarn bin )/lerna run build",
"lint": "$( yarn bin)/lerna run lint",
"test": "$( yarn bin )/karma start"
"test": "$( yarn bin )/karma start",
"ci": "yarn run lint; yarn run build; yarn run test -- --single-run"
},
"devDependencies": {
"@types/chai": "^3.4.34",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/

import {
Plan,
Performing,
PerformingArgs,
PerformingAddPlanArgs,
PerformingArgs,
Plan,
} from 'material-motion-runtime';

import MapScrollPositionToCSSValuePlan from './MapScrollPositionToCSSValuePlan';
Expand All @@ -37,7 +37,7 @@ export default class MapScrollPositionToCSSValuePerformer implements Performing

if (!willChange.includes('transform')) {
if (willChange) {
willChange += ', '
willChange += ', ';
}

willChange += 'transform';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class ParallaxClouds extends React.Component {
makeRefForLayer(i) {
return (element) => {
this._layers[i] = element;
}
};
}

// We have no props and no state, so no need to re-render
Expand Down
2 changes: 1 addition & 1 deletion packages/demos-react/src/map-scroll-to-css/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/


export function range({ start = 0, end = 1 }:{ start?: number, end?: number } = {}):Array<number> {
export function range({ start = 0, end = 1 }:{ start?: number, end?: number } = {}):number[] {
const length = end - start;
return Array(length + 1).fill().map((_, i) => start + i);
}
2 changes: 1 addition & 1 deletion packages/demos-react/src/mount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ ReactDOM.render(
);

if (module.hot) {
module.hot.accept()
module.hot.accept();
}
10 changes: 5 additions & 5 deletions packages/demos-react/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

import * as React from 'react';

import Link from 'react-router/Link'
import Match from 'react-router/Match'
import Miss from 'react-router/Miss'
import Router from 'react-router/BrowserRouter'
import Link from 'react-router/Link';
import Match from 'react-router/Match';
import Miss from 'react-router/Miss';
import Router from 'react-router/BrowserRouter';

import ParallaxClouds from './map-scroll-to-css/components/ParallaxClouds';

Expand All @@ -31,7 +31,7 @@ const links = [
name: 'MapScrollPositionToCSSValue',
component: ParallaxClouds,
}
]
];

function Links() {
return (
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/src/Runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class Runtime {
}

const isActiveTokenGenerator = this._isActiveTokenGenerator;
const PerformerType: PerformingConstructor = plan._PerformerType;
const PerformerType: PerformingConstructor = plan._PerformerType; // tslint:disable-line

const performerMapKey = this._performerMapSelector({ PerformerType, target });
let performer: Performing;
Expand All @@ -85,7 +85,7 @@ export default class Runtime {
// them, it should ensure we get type errors if a feature isn't threaded
// through correctly.

const PerformerOfAllFeatures = PerformerType as PerformingWithAllFeaturesConstructor;
const PerformerOfAllFeatures = PerformerType as PerformingWithAllFeaturesConstructor; // tslint:disable-line
performer = new PerformerOfAllFeatures({ target, isActiveTokenGenerator });

this._performerMap.set(performerMapKey, performer);
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/src/TokenGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class TokenGenerator {
this._updateTokenCount(-1);
}
}
}
};
}

_updateTokenCount(delta: number): void {
Expand Down
5 changes: 3 additions & 2 deletions packages/runtime/src/internal/makeCompoundKeySelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

export type Dict = {
[index:string]: any,
}
};

/**
* A compound key selector searches the object it receives for the values at
Expand All @@ -34,8 +34,9 @@ export default function makeCompoundKeySelector(key1:string, key2:string):(dict:
const value1 = dict[key1];
const value2 = dict[key2];

if (!keyMap.has(value1))
if (!keyMap.has(value1)) {
keyMap.set(value1, new Map());
}

const value1Map = keyMap.get(value1);

Expand Down
2 changes: 1 addition & 1 deletion packages/streams-dom/src/createMotionElementFromDOMNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ export default function createMotionElementFromDOMNode(domNode: Element): Motion
);
},

}
};
}
1 change: 0 additions & 1 deletion packages/streams-dom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* under the License.
*/

export * from './types';
export * from './createMotionElementFromDOMNode';
export { default as createMotionElementFromDOMNode } from './createMotionElementFromDOMNode';

15 changes: 0 additions & 15 deletions packages/streams-dom/src/types.ts

This file was deleted.

1 change: 1 addition & 0 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"ordered-imports": [
true,
{
"import-sources-order": "any",
"named-imports-order": "lowercase-last"
}
],
Expand Down

0 comments on commit 0e7a581

Please sign in to comment.