Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Commit

Permalink
Merge 3848461 into a7d80a6
Browse files Browse the repository at this point in the history
  • Loading branch information
garetht committed Aug 5, 2017
2 parents a7d80a6 + 3848461 commit ce86b38
Show file tree
Hide file tree
Showing 30 changed files with 3,516 additions and 1,395 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["es2015", "flow", "react"],
"plugins": ["transform-class-properties", "transform-object-rest-spread"]
}
50 changes: 12 additions & 38 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
{
"parser": "babel-eslint",

"rules": {
"curly": [2, "all"],
"indent": [2, 2, {"VariableDeclarator": 2}],
"linebreak-style": [2, "unix"],
"one-var": 0,
"space-before-function-paren": [2, "never"],

"react/jsx-boolean-value": 1,
"react/jsx-curly-spacing": [2, "never"],
"react/jsx-no-undef": 1,
"react/no-danger": 1,
"react/react-in-jsx-scope": 1
},

"globals": {
"require": false,
"module": false,
"global": false,

"SyntheticEvent": false,
"ReactElement": false,

"PreloadType": false,
"ElementHeight": false,
"CSSStyle": false,
"ReactInfiniteUtilityFunctions": false,
"ReactInfiniteProvidedDefaultProps": false,
"ReactInfiniteProps": false,
"ReactInfiniteComputedProps": false,
"ReactInfiniteState": false,
"InfiniteComputer": false
"global": false
},

"env": {
"es6": true,
"browser": true
},

"extends": ["semistandard"],

"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
"rules": {
"react/no-did-update-set-state": "off",
"flowtype/define-flow-type": 1
},

"extends": [
"seatgeek-standard",
"seatgeek-react-standard"
],
"plugins": [
"react"
"react",
"prettier",
"flowtype"
]
}

9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
sudo: false
language: node_js
node_js:
- 6
- lts/*
cache:
directories:
- node_modules
- /home/travis/.cypress/Cypress
env:
- TEST=1
- TYPECHECK=1
- LINT=1

- BROWSER=1
script:
- ./config/travis/test.sh
before_install: npm install react react-dom prop-types create-react-class
after_success: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
58 changes: 31 additions & 27 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ var del = require('del');

var browserifyCreator = require('./pipeline/browserify');

var args = require('yargs').alias('P', 'production')
.alias('D', 'development')
.alias('E', 'example').argv;
var args = require('yargs')
.alias('P', 'production')
.alias('D', 'development')
.alias('E', 'example').argv;

var envObject = {
production: args.production,
Expand All @@ -20,17 +21,21 @@ var buildFunction = browserifyCreator(false, envObject, INFINITE_SOURCE);

gulp.task('build-bundle', buildFunction);
gulp.task('cleanly-build-bundle', ['clean'], buildFunction);
gulp.task('watch-develop-bundle', browserifyCreator(true, {development: true}, INFINITE_SOURCE));
gulp.task(
'watch-develop-bundle',
browserifyCreator(true, { development: true }, INFINITE_SOURCE)
);

// This task builds everything for release: the dist
// folder is populated with react-infinite.js and
// react-infinite.min.js, while the build folder is
// provided with a copy of the source transpiled to ES5.
gulp.task('release', ['cleanly-build-bundle'], function() {
// Transpile CommonJS files to ES5 with React's tools.
gulp.src(['./src/**/*.js', './src/**/*.jsx'])
.pipe(babel())
.pipe(gulp.dest('build'));
gulp
.src(['./src/**/*.js', './src/**/*.jsx'])
.pipe(babel())
.pipe(gulp.dest('build'));
});

gulp.task('clean', function() {
Expand All @@ -40,31 +45,30 @@ gulp.task('clean', function() {
// This task is used to build the examples. It is used
// in the development watch function as well.
gulp.task('examples', function() {
gulp.src('./examples/*.jsx')
.pipe(babel())
.pipe(gulp.dest('examples'));
gulp.src('./examples/*.jsx').pipe(babel()).pipe(gulp.dest('examples'));
});

gulp.task('server', function() {
gulp.src(__dirname)
.pipe(server({
port: 8080,
directoryListing: true,
livereload: {
enable: true,
filter: function(filename) {
if (filename.match(__dirname + '/examples')) {
return true;
// The examples draw from /dist, which should change
// when the source files change
} else if (filename.match(__dirname + '/dist')) {
return true;
} else {
return false;
}
gulp.src(__dirname).pipe(
server({
port: 8080,
directoryListing: true,
livereload: {
enable: true,
filter: function(filename) {
if (filename.match(__dirname + '/examples')) {
return true;
// The examples draw from /dist, which should change
// when the source files change
} else if (filename.match(__dirname + '/dist')) {
return true;
} else {
return false;
}
}
}));
}
})
);
});

// This task is used for development. When run, it sets up
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ When working with the window as the scroll container, it is sometimes useful to
#### **Function** `handleScroll(DOMNode node)`
Defaults to `function(){}`. A function that is called when the container is scrolled, i.e. when the `onScroll` event of the infinite scrolling container is fired. The only argument passed to it is the native DOM [Node](https://developer.mozilla.org/en-US/docs/Web/API/Node) of the scrolling container.

#### **Number** `infiniteLoadBeginBottomOffset`
**Deprecated as of 0.6.0. Please use `infiniteLoadBeginEdgeOffset`, which is identical but renamed.**

#### **Number** `infiniteLoadBeginEdgeOffset`
Defaults to `undefined`, which means that infinite loading is disabled. To disable infinite loading, do not provide this property or set it to undefined.

Expand Down
Loading

0 comments on commit ce86b38

Please sign in to comment.