Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
willemliu committed Dec 8, 2017
1 parent da23bd2 commit 97c65a6
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 70 deletions.
28 changes: 15 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
language: node_js

node_js:
- "node"

- node
addons:
apt:
packages:
- nodejs-legacy

- nodejs-legacy
install:
- npm install -g gulp
- npm install -g typescript
- npm install

- npm install -g gulp
- npm install -g typescript
- npm install
script:
- npm run test
- npm run lint

- npm run test
- npm run lint
after_success:
- "cat ./dist/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
- cat ./dist/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
deploy:
provider: npm
email: [email protected]
on:
branch: master
api_key:
secure: UoaHrzZ5TjphJH+uymWfLitGKceqK3Dq5PcIVSMfW6za9ulOGy//nXtLYFDEexOxKZIc4MZpKl+CT52yK0HLN4WdrPIJFKkS6MYg5MaAf7BpzY0BahzkoFEx8bFr4tDuapFj/aqKj+30ZoYcJ8d2TmmjVxKbwlfnYuWcM2nAkvrO4Ld8YYx3jd1TnFKdeC/zfzTsO8MLqvo9EVxa1tWoQUXGcyvpupuisi3ineulONuOTEBXyVstQI4yYBOYaG4/2q7DnmAnW+kxigvSKllWsiSqJSZT7uHPa0xSkdtKWufHovHwKw28s2DyIlesLyvSla+XTEJouQ52B/1Os8cJ3uDO4JAnwoJuPFdjPH0NIS+EE64BEYUSU4dZ6dtMnOb93xCvvkldCnS47pGBR8CsTB2MAM4L9s9DRgo/fqHHKTKsiiKhYZ7+lYklG6rifODZFXtTWCFtPhgwdxHx/0nvlQDh4xux9GZMvXbzfeYy8YCofIVKF+Tdcqg7ZZUiRtH5ESyiJudzufbIxNZs7kmgLsbKw6lM4+o2hTBVPCZXr4RjGzbvRQPH1y4g3lHPoCnKoE+nDq3I/0huwo7LNP3GflT9swBuapgj7gzj1OiR29by0OAGkCt17d2rS3NYb5kGykVzMx6jc99tpgjcaGuOy8uiOLQ7dhFyptJeKGMoSD0=
16 changes: 6 additions & 10 deletions dist/PlayerControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,16 @@ var PlayerControls = /** @class */ (function (_super) {
function PlayerControls(props) {
var _this = _super.call(this, props) || this;
_this.props = props;
console.info('Player controls composition', _this.state, _this.props);
return _this;
}
PlayerControls.prototype.render = function () {
var previousButton = this.props.showPreviousButton ? (React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.previousButtonImage, onClick: this.props.onPrevious, className: "previous-button", alt: "previous button" })) : null;
var playPauseButton = this.props.showPlayPauseButton ? (React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.playPauseButtonImage, onClick: this.props.onPlayPause, className: "playpause-button", alt: "play/pause button" })) : null;
var nextButton = this.props.showNextButton ? (React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.nextButtonImage, onClick: this.props.onNext, className: "next-button", alt: "next button" })) : null;
return (React.createElement("div", { className: this.props.className },
this.props.showPreviousButton ?
React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.previousButtonImage, onClick: this.props.onPrevious, className: "previous-button", alt: "previous button" })
: null,
this.props.showPlayPauseButton ?
React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.playPauseButtonImage, onClick: this.props.onPlayPause, className: "playpause-button", alt: "play/pause button" })
: null,
this.props.showNextButton ?
React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.nextButtonImage, onClick: this.props.onNext, className: "next-button", alt: "next button" })
: null));
previousButton,
playPauseButton,
nextButton));
};
return PlayerControls;
}(React.Component));
Expand Down
106 changes: 72 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "fdmg-ts-react-player-controls",
"version": "1.0.7",
"version": "1.0.8",
"description": "ReactJS PlayerControls component",
"main": "dist/PlayerControls.js",
"types": "dist/PlayerControls.d.ts",
"scripts": {
"release": "npm install && yarn && tsc -d",
"release": "npm update && npm install && yarn && npm run test && npm run lint && tsc -d",
"test": "jest",
"lint": "tslint -p .",
"updateSnapshot": "jest --updateSnapshot",
Expand All @@ -19,20 +19,21 @@
"license": "ISC",
"devDependencies": {
"@types/jest": "^21.1.8",
"@types/react": "^16.0.23",
"@types/react": "^16.0.28",
"coveralls": "^3.0.0",
"enzyme": "^3.2.0",
"enzyme-adapter-react-16": "^1.1.0",
"enzyme-to-json": "^3.2.2",
"jest": "^21.2.1",
"jest-cli": "^21.2.1",
"raf": "^3.4.0",
"react": "^16.1.1",
"react-dom": "^16.1.1",
"react-test-renderer": "^16.1.1",
"ts-jest": "^21.2.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-test-renderer": "^16.2.0",
"ts-jest": "^21.2.4",
"tslint": "^5.8.0",
"tslint-react": "^3.2.0",
"typescript": "^2.5.3"
"typescript": "^2.6.2"
},
"jest": {
"transform": {
Expand Down Expand Up @@ -60,6 +61,6 @@
"mapCoverage": true
},
"dependencies": {
"fdmg-ts-react-image-button": "^1.0.21"
"fdmg-ts-react-image-button": "^1.0.23"
}
}
7 changes: 3 additions & 4 deletions test/PlayerControls.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('PlayerControls', () => {
Enzyme.configure({ adapter: new Adapter() });
});

test('PlayerControls renders correctly', () => {
test('renders correctly', () => {
const component = shallow(
<PlayerControls
showPreviousButton={true}
Expand All @@ -32,7 +32,7 @@ describe('PlayerControls', () => {
expect(toJson(component)).toMatchSnapshot();
});

test('PlayerControls buttons clicked', () => {
test('buttons clicked', () => {
const spyPrev = jest.fn();
const spyPlay = jest.fn();
const spyNext = jest.fn();
Expand All @@ -55,7 +55,7 @@ describe('PlayerControls', () => {
expect(spyPrev).toHaveBeenCalled();
});

test('PlayerControls renders previous, next or play/pause button correctly', () => {
test('renders previous, next or play/pause button correctly', () => {
let component = mount(
<PlayerControls
showPreviousButton={true}
Expand Down Expand Up @@ -91,6 +91,5 @@ describe('PlayerControls', () => {
/>
);
expect(toJson(component)).toMatchSnapshot();

});
});

0 comments on commit 97c65a6

Please sign in to comment.