diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c452c58 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/coverage +/demo/dist +/es +/lib +/node_modules +/umd +npm-debug.log* diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..06e30d9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +sudo: false + +language: node_js +node_js: + - 8 + +before_install: + - npm install codecov.io coveralls + +after_success: + - cat ./coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js + - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +branches: + only: + - master diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d8b0984 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ +## Prerequisites + +[Node.js](http://nodejs.org/) >= v4 must be installed. + +## Installation + +- Running `npm install` in the component's root directory will install everything you need for development. + +## Demo Development Server + +- `npm start` will run a development server with the component's demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading. + +## Running Tests + +- `npm test` will run the tests once. + +- `npm run test:coverage` will run the tests and produce a coverage report in `coverage/`. + +- `npm run test:watch` will run the tests on every change. + +## Building + +- `npm run build` will build the component for publishing to npm and also bundle the demo app. + +- `npm run clean` will delete built resources. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7503031 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# use-payment-inputs + +[![Travis][build-badge]][build] +[![npm package][npm-badge]][npm] +[![Coveralls][coveralls-badge]][coveralls] + +Describe use-payment-inputs here. + +[build-badge]: https://img.shields.io/travis/user/repo/master.png?style=flat-square +[build]: https://travis-ci.org/user/repo + +[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square +[npm]: https://www.npmjs.org/package/npm-package + +[coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square +[coveralls]: https://coveralls.io/github/user/repo diff --git a/demo/src/index.js b/demo/src/index.js new file mode 100644 index 0000000..6e8e911 --- /dev/null +++ b/demo/src/index.js @@ -0,0 +1,15 @@ +import React, {Component} from 'react' +import {render} from 'react-dom' + +import Example from '../../src' + +class Demo extends Component { + render() { + return