Skip to content

Commit

Permalink
feat(): CIremove running mocha test when no tests exist in project
Browse files Browse the repository at this point in the history
  • Loading branch information
crobinson42 committed Apr 20, 2018
1 parent 13b5660 commit ecabfd4
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 37 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ cache:
notifications:
email: false
node_js:
- '7'
- '9'
- '8'
- '6'
- '4'
before_script:
- npm prune
- npm run test
after_success:
- npm run build
- npm run semantic-release
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Skeleton "micro" css framework boilerplate: http://www.getskeleton.com. Consolid
[![Build Status](https://travis-ci.org/crobinson42/react-skeleton-css.svg?branch=master)](https://travis-ci.org/crobinson42/react-skeleton-css)
[![npm version](https://badge.fury.io/js/react-skeleton-css.svg)](https://badge.fury.io/js/react-skeleton-css)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![react](https://cloud.githubusercontent.com/assets/5973579/22582957/e5f05040-e99e-11e6-9e07-607a5de86899.png)](https://react.facebook.com)

------

Expand All @@ -30,4 +29,10 @@ npm install react-skeleton-css

## Usage

After you've included react-skeleton-css and the skeleton css/stylesheets, you can use the components. Caveat: you must include the skeleton css/stylesheets in your project.
> You must include the skeleton css/stylesheets in your project.
```
<link href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" type="text/css" rel="stylesheet">
```

After you've included react-skeleton-css and the skeleton css/stylesheets, you can use the components.
47 changes: 22 additions & 25 deletions lib/components/Button.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import React, { Component } from "react";
import PropTypes from "prop-types";

class Button extends Component {
render() {
const { primary, pull, className, ...props } = this.props
let _className = this.props.primary ? 'button-primary' : className
_className += this.props.pull ? ` u-pull-${this.props.pull}` : ''
render() {
const { primary, pull, className, ...props } = this.props;
let _className = this.props.primary ? "button-primary" : className;
_className += this.props.pull ? ` u-pull-${this.props.pull}` : "";

return (
<button
className={_className}
{...props}
>
{this.props.children}
</button>
);
}
return (
<button className={_className} {...props}>
{this.props.children}
</button>
);
}
}

Button.defaultProps = {
pull: '',
style: {},
className: 'button',
primary: false
}
pull: "",
style: {},
className: "button",
primary: false
};

Button.propTypes = {
pull: PropTypes.oneOf(['left', 'right', '']),
style: PropTypes.object.isRequired,
className: PropTypes.string.isRequired,
primary: PropTypes.bool.isRequired,
}
pull: PropTypes.oneOf(["left", "right", ""]),
style: PropTypes.object.isRequired,
className: PropTypes.string.isRequired,
primary: PropTypes.bool.isRequired
};

export default Button;
12 changes: 6 additions & 6 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/crobinson42/react-skeleton-css"
},
"scripts": {
"test": "mocha",
"test": "exit 0",
"dev": "webpack-dev-server --hot --watch",
"build": "NODE_ENV=production webpack -p",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
Expand Down

0 comments on commit ecabfd4

Please sign in to comment.