From d179f3ab0f63fcdcd1b4ec63376a0b89f88b4ccc Mon Sep 17 00:00:00 2001 From: jfusco Date: Mon, 18 Jul 2016 11:21:46 -0400 Subject: [PATCH] Fixing Travis integration and changing the name of the tag component --- .travis.yml | 2 +- dist-components/Tags.js | 6 +++--- package.json | 2 +- src/js/{tag.js => Tag.js} | 6 +++--- src/js/Tags.js | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/js/{tag.js => Tag.js} (90%) diff --git a/.travis.yml b/.travis.yml index bcd98f7..18cba98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,4 @@ before_install: - npm install -g babel-cli - npm install -g jest-cli script: - - "gulp eslint" + - "gulp eslint && npm test" diff --git a/dist-components/Tags.js b/dist-components/Tags.js index eb08691..151d20b 100644 --- a/dist-components/Tags.js +++ b/dist-components/Tags.js @@ -14,9 +14,9 @@ var _reactAddonsUpdate = require('react-addons-update'); var _reactAddonsUpdate2 = _interopRequireDefault(_reactAddonsUpdate); -var _tag = require('./tag'); +var _Tag = require('./Tag'); -var _tag2 = _interopRequireDefault(_tag); +var _Tag2 = _interopRequireDefault(_Tag); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -123,7 +123,7 @@ var Tags = function (_Component) { var _this4 = this; var tagItems = this.state.tags.map(function (tag, v) { - return _react2.default.createElement(_tag2.default, { + return _react2.default.createElement(_Tag2.default, { key: v, readOnly: _this4.props.readOnly, name: tag, diff --git a/package.json b/package.json index 59af4ed..efb9add 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-tagging-input", - "version": "1.1.4", + "version": "1.1.5", "description": "Simple tagging component", "main": "dist-components/Tags.js", "license": "MIT", diff --git a/src/js/tag.js b/src/js/Tag.js similarity index 90% rename from src/js/tag.js rename to src/js/Tag.js index 48dc596..cb93b32 100644 --- a/src/js/tag.js +++ b/src/js/Tag.js @@ -2,7 +2,7 @@ import React from 'react'; -const tag = props => { +const Tag = props => { const onRemoveClick = e => { e.preventDefault(); @@ -29,9 +29,9 @@ const tag = props => { ); }; -export default tag; +export default Tag; -tag.propTypes = { +Tag.propTypes = { name: React.PropTypes.string.isRequired, removeTag: React.PropTypes.func, readOnly: React.PropTypes.bool, diff --git a/src/js/Tags.js b/src/js/Tags.js index 68a652b..9e65ac1 100644 --- a/src/js/Tags.js +++ b/src/js/Tags.js @@ -2,7 +2,7 @@ import React, {Component} from 'react'; import update from 'react-addons-update'; -import tag from './tag'; +import Tag from './Tag'; const map = new WeakMap(); @@ -95,7 +95,7 @@ export default class Tags extends Component{ render(){ const tagItems = this.state.tags.map((tag, v) => { - return