Skip to content

Commit aa51c07

Browse files
committed
add readme file
1 parent a22d962 commit aa51c07

File tree

3 files changed

+148
-10
lines changed

3 files changed

+148
-10
lines changed

.gitignore

+76-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,82 @@
22
/demo/dist
33
/es
44
/lib
5-
/node_modules
65
/umd
76
npm-debug.log*
87

9-
.DS_Store
8+
# Logs
9+
logs
10+
*.log
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
*.pid.lock
20+
21+
# Directory for instrumented libs generated by jscoverage/JSCover
22+
lib-cov
23+
24+
# Coverage directory used by tools like istanbul
25+
coverage
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (http://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# Typescript v1 declaration files
47+
typings/
48+
49+
# Optional npm cache directory
50+
.npm
51+
52+
# Optional eslint cache
53+
.eslintcache
54+
55+
# Optional REPL history
56+
.node_repl_history
57+
58+
# Output of 'npm pack'
59+
*.tgz
60+
61+
# Yarn Integrity file
62+
.yarn-integrity
63+
64+
# dotenv environment variables file
65+
.env
66+
67+
# VS Code
68+
.vscode/*
69+
70+
# Windows
71+
Thumbs.db
72+
Desktop.ini
73+
74+
# Mac
75+
.DS_Store
76+
**/.DS_Store
77+
78+
# JetBrains
79+
.idea
80+
.project
81+
.settings
82+
.idea/*
83+
*.iml

README.md

+70-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,80 @@
1-
# pagination-react
1+
# @99xt/pagination-react
22

3-
[![Travis][build-badge]][build]
43
[![npm package][npm-badge]][npm]
54
[![Coveralls][coveralls-badge]][coveralls]
5+
[![license](https://img.shields.io/github/license/99xt/react-pagination.svg)](https://github.com/99xt/react-pagination/blob/master/LICENSE)
6+
[![Build Status](https://travis-ci.org/99xt/react-pagination.svg?branch=master)](https://travis-ci.org/99xt/react-pagination)
67

7-
Describe pagination-react here.
8-
9-
[build-badge]: https://img.shields.io/travis/user/repo/master.png?style=flat-square
10-
[build]: https://travis-ci.org/user/repo
118

129
[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
1310
[npm]: https://www.npmjs.org/package/npm-package
1411

1512
[coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square
1613
[coveralls]: https://coveralls.io/github/user/repo
14+
15+
Simple pagination component for React JS apps.
16+
17+
18+
## Installation
19+
20+
To install this library, run:
21+
22+
```bash
23+
npm install @99xt/pagination-react --save
24+
```
25+
26+
## Usage
27+
28+
example.react.js
29+
30+
```html
31+
<pagination
32+
total="totalRecordCount"
33+
limit="recordsPerPage"
34+
>
35+
</pagination>
36+
```
37+
38+
## Contributing Guide
39+
40+
### Setting up the development environment
41+
42+
Clone the repository to your workstation
43+
44+
```bash
45+
git clone git@github.com:99xt/react-pagination.git
46+
```
47+
48+
Navigate to the project directory
49+
50+
```bash
51+
cd react-pagination
52+
```
53+
54+
Install and build the library
55+
56+
```bash
57+
npm install
58+
```
59+
60+
### Run Demo app
61+
62+
```
63+
npm install
64+
npm start
65+
```
66+
67+
check localhost:3000 to see the preview of the demo
68+
69+
### Publish to NPM
70+
71+
Update the version in `package.json`;
72+
73+
```
74+
npm run build
75+
npm publish
76+
```
77+
78+
## License
79+
80+
MIT

tests/index-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ describe('Component', () => {
1515
unmountComponentAtNode(node)
1616
})
1717

18-
it('displays a welcome message', () => {
18+
it('sample test case', () => {
1919
render(<Component/>, node, () => {
20-
expect(node.innerHTML).toContain('Welcome to React components')
20+
expect(node.innerHTML).toContain('Prev')
2121
})
2222
})
2323
})

0 commit comments

Comments
 (0)