Skip to content

Commit

Permalink
Incorporated development + production builds into /dist (#64) (#66)
Browse files Browse the repository at this point in the history
* Incorporated development + production builds into /dist (#64) and
updated Readme to include CDN/External information.

* Dropping references to Webpack specific build configurations in Readme
and adding clarity for CDN/external.
  • Loading branch information
virgofx authored and jquense committed Jun 12, 2017
1 parent 4167bee commit d3a78bf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
## [v1.1.X]
> 2017-XX-XX
- **Feature:** Dist build now includes both production and development builds ([#64])

## [v1.1.3]
> 2017-05-02
Expand Down
10 changes: 9 additions & 1 deletion README.md
Expand Up @@ -20,14 +20,22 @@ npm install react-transition-group --save
yarn add react-transition-group
```

## CDN / External

Since react-transition-group is fairly small, the overhead of including the library in your application is
negligible. However, in situations where it may be useful to benefit from an external CDN when bundling, link
to the following CDN:

[https://unpkg.com/react-transition-group/dist/react-transition-group.min.js](https://unpkg.com/react-transition-group/dist/react-transition-group.min.js)

## High-level API: CSSTransitionGroup

`CSSTransitionGroup` is a high-level API based on [`TransitionGroup`](#low-level-api-transitiongroup) and is an easy way to perform CSS transitions and animations when a React component enters or leaves the DOM. It's inspired by the excellent [ng-animate](http://www.nganimate.org/) library.

**Importing**

```javascript
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup' // ES6
import { CSSTransitionGroup } from 'react-transition-group' // ES6

var CSSTransitionGroup = require('react-transition-group/CSSTransitionGroup') // ES5 with npm
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -7,7 +7,7 @@
"test": "jest --runInBand --verbose",
"tdd": "jest --watch",
"build": "rimraf lib && babel src --out-dir lib && npm run build:dist",
"build:dist": "rimraf lib/dist && webpack -p --define process.env.NODE_ENV='production'",
"build:dist": "rimraf lib/dist && webpack && NODE_ENV=production webpack -p",
"lint": "eslint src test",
"release": "release",
"storybook": "start-storybook -p 6006",
Expand Down
4 changes: 3 additions & 1 deletion webpack.config.js
Expand Up @@ -3,7 +3,9 @@ const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'react-transition-group.js',
filename: process.env.NODE_ENV === 'production'
? 'react-transition-group.min.js'
: 'react-transition-group.js',
path: path.join(__dirname, 'lib/dist'),
library: 'ReactTransitionGroup',
libraryTarget: 'umd',
Expand Down

0 comments on commit d3a78bf

Please sign in to comment.