Skip to content

Commit

Permalink
updated v2.1.1 (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
kidjp85 committed Mar 25, 2019
1 parent c96a575 commit 747a57a
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ node_js:
install:
- yarn install
- npm install -g codecov
scripts:
script:
- yarn test
- yarn test:coverage
- yarn lint
after_success: "cat ./coverage/lcov.info | $(npm bin)/codecov"
after_script: "cat ./coverage/lcov.info | $(npm bin)/codecov"
branches:
only:
- master
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log for React-id-swiper

## [v2.1.1](https://github.com/kidjp85/react-id-swiper/compare/2.1.1...2.1.0) - Released on Mar 26th, 2019
* Add full version back to lib folder

## [v2.1.0](https://github.com/kidjp85/react-id-swiper/compare/2.1.0...2.0.0) - Released on Mar 15th, 2019
* :bomb: **Great news** - Add new props **`modules`** that allows to import only necessary swiper modules.
* Fix `activeSlideKey` does not work correctly when `loop: true`
Expand Down
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![Package Quality](http://npm.packagequality.com/badge/react-id-swiper.png)](http://packagequality.com/#?package=react-id-swiper)

react-id-swiper ( Newest version 2.1.0 )
react-id-swiper ( Newest version 2.1.1 )
========================================
> A library to use [Swiper](http://www.idangero.us/swiper/get-started/) as a ReactJs component
Expand Down Expand Up @@ -48,7 +48,9 @@ NOTE: You can also use Swiper's original params too. Swiper API documentation [H

- From version 2.0.0 requires React & ReactDOM ver >=16.8.0 to use [Hooks](https://reactjs.org/docs/hooks-intro.html)

- From version 2.1.0, adding new props named `modules` that can help reducing bundle file size. More info [here](https://idangero.us/swiper/api/#custom-build)
- From version 2.1.1, adding new props named `modules` that can help reducing bundle file size. More info [here](https://idangero.us/swiper/api/#custom-build)

- Full build swiper version is available from `2.1.1`, which can be found from `react-id-swiper/lib/ReactIdSwiper.full`.

## Installation and setup

Expand All @@ -58,8 +60,6 @@ NOTE: You can also use Swiper's original params too. Swiper API documentation [H
```bash
npm install --save react-id-swiper@latest swiper@latest


```

> By Yarn
Expand All @@ -71,11 +71,11 @@ yarn add react-id-swiper@latest swiper@latest
### CDN

```html
<script src="https://unpkg.com/react-id-swiper@2.1.0/lib/react-id-swiper.js"></script>
<script src="https://unpkg.com/react-id-swiper@2.1.1/lib/react-id-swiper.js"></script>
```

```html
<script src="https://unpkg.com/react-id-swiper@2.1.0/lib/react-id-swiper.min.js"></script>
<script src="https://unpkg.com/react-id-swiper@2.1.1/lib/react-id-swiper.min.js"></script>
```

## Styling
Expand Down Expand Up @@ -115,6 +115,25 @@ const SimpleSwiper = () => (
export default SimpleSwiper;
```

### Using full version of Swiper

```javascript
import React from 'react';
import Swiper from 'react-id-swiper/lib/ReactIdSwiper.full';

const SimpleSwiper = () => (
<Swiper>
<div>Slide 1</div>
<div>Slide 2</div>
<div>Slide 3</div>
<div>Slide 4</div>
<div>Slide 5</div>
</Swiper>
)

export default SimpleSwiper;
```

### Using params

```javascript
Expand Down
13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
{
"name": "react-id-swiper",
"version": "2.1.0",
"version": "2.1.1",
"description": "ReactJs component for iDangerous Swiper",
"main": "lib/index",
"types": "lib/index.d.ts",
"files": [
"lib/index.js",
"lib/index.d.ts",
"lib/ReactIdSwiper.js",
"lib/ReactIdSwiper.d.ts",
"lib/utils.js",
"lib/utils.d.ts",
"lib/types.js",
"lib/types.d.ts",
"lib/react-id-swiper.js",
"lib/react-id-swiper.min.js",
"lib/**/*",
"src/styles/**/*"
],
"scripts": {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const files = [
{
outputName: 'react-id-swiper',
entryName: 'ReactIdSwiper.umd'
entryName: 'ReactIdSwiper.full'
},
{
outputName: 'react-id-swiper.min',
entryName: 'ReactIdSwiper.umd',
entryName: 'ReactIdSwiper.full',
minimizer: true
}
];
Expand Down

0 comments on commit 747a57a

Please sign in to comment.