Skip to content

Commit

Permalink
Merge branch 'release/2.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauren committed May 13, 2018
2 parents 74b6bab + 72842df commit 7d82089
Show file tree
Hide file tree
Showing 37 changed files with 12,102 additions and 1,422 deletions.
10 changes: 0 additions & 10 deletions .babelrc

This file was deleted.

69 changes: 0 additions & 69 deletions .eslintrc

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Logs
logs
*.log
dist
.rpt2_cache
!example/umd

# Runtime data
pids
Expand All @@ -27,5 +30,3 @@ build/Release
node_modules
lib
*.zip

yarn.lock
43 changes: 36 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
example
.babelrc
.eslintrc
index.html
webpack.config.build.js
webpack.config.js
# Logs
logs
*.log
dist

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
lib

example
tslint.json
*.zip
.npmignore
.vscode
tsconfig.json
rollup.config.js
.yarn-lock
.rpt2_cache
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"search.exclude": {
"**/node_modules": true,
"**/yarn.lock": true,
"**/dist": true,
},
"emmet.showExpandedAbbreviation": "never",
"tslint.enable": true,
"tslint.run": "onType",
"tslint.autoFixOnSave": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"typescript.locale": "en",
"editor.tabSize": 4,
"editor.insertSpaces": true,
"workbench.colorCustomizations": {
"editorWarning.foreground": "#FFAA00"
}
}
36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
# react-owl-carousel [![npm version](https://img.shields.io/npm/v/react-owl-carousel.svg?style=flat)](https://www.npmjs.com/package/react-owl-carousel)
[React](http://facebook.github.io/react/) + [Owl Carousel 2.2](https://owlcarousel2.github.io/OwlCarousel2/)
[React](http://facebook.github.io/react/) + [Owl Carousel 2.3](https://owlcarousel2.github.io/OwlCarousel2/)

### 1.Getting Started
### 1. Getting Started

```jsx
import React from 'react';
import OwlCarousel from 'react-owl-carousel';
* You need to inject a global window.jQuery first.

e.g. webpack

```js
// ...
plugins: [
// other plugins,
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
}),
],
//...
```

you can use html script tag to inject jquery as well.

### 2.Set up your javascript
### 2. Set up your component
wrap your divs inside the OwlCarousel component

```jsx
<OwlCarousel
import React from 'react';
import OwlCarousel from 'react-owl-carousel';
import 'owl.carousel/dist/assets/owl.carousel.css';
import 'owl.carousel/dist/assets/owl.theme.default.css';

// ....

// className "owl-theme" is optional
<OwlCarousel
className="owl-theme"
loop margin={10} nav
>
Expand All @@ -31,7 +52,6 @@ wrap your divs inside the OwlCarousel component
<div class="item"><h4>12</h4></div>
</OwlCarousel>
```
className "owl-theme" is optional

## Event
| Name | Descrption |
Expand Down
Loading

0 comments on commit 7d82089

Please sign in to comment.