From 47ad8c6106b4ee8e7645d93f33e6e02ac96123c8 Mon Sep 17 00:00:00 2001 From: Geoff Kimball Date: Thu, 22 Sep 2016 18:57:03 -0500 Subject: [PATCH] Initial commit --- .babelrc | 3 +++ .gitignore | 3 +++ LICENSE | 20 ++++++++++++++ README.md | 7 +++++ package.json | 38 +++++++++++++++++++++++++++ src/__tests__/index.js | 4 +++ src/components/Container.js | 13 +++++++++ src/components/__tests__/Container.js | 11 ++++++++ src/index.js | 0 9 files changed, 99 insertions(+) create mode 100644 .babelrc create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package.json create mode 100644 src/__tests__/index.js create mode 100644 src/components/Container.js create mode 100644 src/components/__tests__/Container.js create mode 100644 src/index.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..bd4454f --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["latest", "react"] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7595163 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +npm-debug.log diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..eec2fab --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..2cfaafa --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# react-inky + +> React components for Inky + +## License + +MIT © [Geoff Kimball](http://geoffkimball.com) diff --git a/package.json b/package.json new file mode 100644 index 0000000..2628b9a --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-inky", + "version": "1.0.0", + "description": "React components for Inky", + "main": "index.js", + "scripts": { + "test": "mocha --compilers js:babel-register \"src/**/__tests__/*.js\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gakimball/react-inky.git" + }, + "keywords": [ + "react", + "inky", + "email" + ], + "author": "Geoff Kimball (http://geoffkimball.com)", + "license": "MIT", + "bugs": { + "url": "https://github.com/gakimball/react-inky/issues" + }, + "homepage": "https://github.com/gakimball/react-inky#readme", + "dependencies": { + "react": "^15.3.2" + }, + "devDependencies": { + "babel-preset-latest": "^6.14.0", + "babel-preset-react": "^6.11.1", + "babel-register": "^6.14.0", + "chai": "^3.5.0", + "chai-enzyme": "^0.5.1", + "enzyme": "^2.4.1", + "mocha": "^3.0.2", + "react-dom": "^15.3.2", + "react-server": "^0.4.7" + } +} diff --git a/src/__tests__/index.js b/src/__tests__/index.js new file mode 100644 index 0000000..77b3b31 --- /dev/null +++ b/src/__tests__/index.js @@ -0,0 +1,4 @@ +const chai = require('chai'); +const chaiEnzyme = require('chai-enzyme'); + +chai.use(chaiEnzyme); diff --git a/src/components/Container.js b/src/components/Container.js new file mode 100644 index 0000000..6538b3e --- /dev/null +++ b/src/components/Container.js @@ -0,0 +1,13 @@ +import React from 'react'; + +export default function Container(props) { + return ( + + + + + + +
{props.children}
+ ); +} diff --git a/src/components/__tests__/Container.js b/src/components/__tests__/Container.js new file mode 100644 index 0000000..07d0fad --- /dev/null +++ b/src/components/__tests__/Container.js @@ -0,0 +1,11 @@ +import React from 'react'; +import { expect } from 'chai'; +import { shallow } from 'enzyme'; +import Container from '../Container'; + +describe('', () => { + it('renders a table', () => { + const wrapper = shallow(); + expect(wrapper.find('table')).to.have.lengthOf(1); + }); +}); diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..e69de29