Skip to content

some up-to-date changes (bump to 0.2.0) #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .babelrc

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"env" : {
"browser" : true
},
"globals" : {
"jQuery": false,
"$": false
},
"rules": {
"semi" : [2, "never"],
"max-len": [2, 120, 2],
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ node_modules

# Optional npm cache directory
.npm
*~
*.sw*
yarn.lock
.cache

# Optional REPL history
.node_repl_history
9 changes: 4 additions & 5 deletions __tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ jest.unmock('../src/index.jsx')

import React from 'react'
import ReactDOM from 'react-dom'
import jQuery from 'jquery'

import TestUtils from 'react-dom/test-utils'
import ReactScrollPagination from '../src/index.jsx'
Expand Down Expand Up @@ -34,13 +33,13 @@ describe('ReactScrollPagination', () => {
expect(mockConsoleError.calls.count()).toEqual(1)
})

it('Should not display the pagination div if only props "fetchFunc" presented', () => {
it('Should not display the pagination div when no "totalPages" provided', () => {
const reactScrollPagination = TestUtils.renderIntoDocument(
<ReactScrollPagination fetchFunc={fetchFunc} />
)
const reactScrollPaginationNode = ReactDOM.findDOMNode(reactScrollPagination)
expect(reactScrollPaginationNode).toEqual(null)
expect(mockConsoleWarn.calls.count()).toEqual(0)
expect(mockConsoleWarn.calls.count()).toEqual(1)
})

describe('Test the props "paginationShowTime" ', () => {
Expand All @@ -66,7 +65,7 @@ describe('ReactScrollPagination', () => {

describe('Test the props "excludeElement" ', () => {
beforeEach(() => {
document.body.innerHTML = '<nav id="navbar" style="height:70px" > navbar1 </nav>'
document.body.innerHTML = '<div id="navbar" style="height:70px;" > navbar1 </div>'
})

it('Should take default value if the props is not presented ', ()=> {
Expand Down Expand Up @@ -192,4 +191,4 @@ describe('ReactScrollPagination', () => {
})
})

})
})
2,734 changes: 6 additions & 2,728 deletions dist/index.js

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions gulpfile.js

This file was deleted.

47 changes: 25 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-scroll-pagination",
"version": "0.1.10",
"version": "0.2.0",
"description": "A component for pagination with scrolling",
"main": "dist/index.js",
"scripts": {
Expand All @@ -26,28 +26,27 @@
},
"homepage": "https://github.com/codingfishman/react-scroll-pagination#readme",
"dependencies": {
"create-react-class": "^15.6.2",
"jquery": "^1.0.0",
"prop-types": "^15.6.0"
"prop-types": "^15.6.0",
"react": "^16.0.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^6.0.3",
"babel-jest": "^9.0.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.24.1",
"eslint": "^2.8.0",
"eslint-plugin-flow-vars": "^0.3.0",
"jasmine": "^2.8.0",
"jest": "^21.2.1",
"jest-cli": "^21.2.1",
"jscs": "^3.0.3",
"react": "~15.6.2",
"react-dom": "^15.6.2",
"webpack": "^3.6.0"
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-transform-react-inline-elements": "^7.9.0",
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.9.1",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.2.3",
"babel-loader": "^8.1.0",
"eslint": "^6.8.0",
"jasmine": "^3.5.0",
"jest": "^25.2.3",
"jest-cli": "^25.2.3",
"jscs": "^3.0.7",
"react-dom": "^16.0.0",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
},
"jest": {
"unmockedModulePathPatterns": [
Expand All @@ -56,6 +55,10 @@
"<rootDir>/node_modules/react-addons-test-utils",
"<rootDir>/node_modules/jquery"
],
"collectCoverage": true
"collectCoverage": true,
"modulePathIgnorePatterns": [],
"transform": {
"^.+\\.js$": "babel-jest"
}
}
}
Loading