File tree Expand file tree Collapse file tree 5 files changed +642
-595
lines changed
Expand file tree Collapse file tree 5 files changed +642
-595
lines changed Original file line number Diff line number Diff line change 11{
22 "presets" : [
3- [" latest" , {
4- "es2015" : { "loose" : true }
5- }],
6- " stage-2" ,
7- " react"
8- ],
9- "plugins" : [
10- " dev-expression" ,
11- " add-module-exports" ,
12- " transform-object-assign" ,
13- [" transform-react-remove-prop-types" , { "mode" : " wrap" }]
3+ " ./.babelrc.js"
144 ]
155}
Original file line number Diff line number Diff line change 1+ const modules = process . env . BABEL_ENV === 'es' ? false : 'commonjs'
2+
3+ const presets = [
4+ [ 'latest' , {
5+ es2015 : { loose : true , modules }
6+ } ] ,
7+ 'stage-2' ,
8+ 'react'
9+ ]
10+
11+ const plugins = [
12+ 'dev-expression' ,
13+ 'add-module-exports' ,
14+ 'transform-object-assign' ,
15+ [ 'transform-react-remove-prop-types' , { mode : 'wrap' } ]
16+ ]
17+
18+ module . exports = { plugins, presets }
Original file line number Diff line number Diff line change 33 "version" : " 2.3.0-beta.0" ,
44 "description" : " A react component toolset for managing animations" ,
55 "main" : " lib/index.js" ,
6+ "module" : " es/index.js" ,
67 "scripts" : {
78 "test" : " npm run lint && npm run testonly" ,
89 "testonly" : " jest --verbose" ,
910 "tdd" : " jest --watch" ,
10- "build" : " rimraf lib && babel src --out-dir lib && npm run build:dist && cp README.md LICENSE ./lib" ,
11+ "build" : " rimraf lib && npm run build:cjs && npm run build:es && npm run build:dist && cp README.md LICENSE ./lib" ,
12+ "build:es" : " cross-env BABEL_ENV=es babel src --out-dir lib/es" ,
13+ "build:cjs" : " cross-env BABEL_ENV=cjs babel src --out-dir lib" ,
1114 "build:dist" : " rimraf lib/dist && webpack && NODE_ENV=production webpack -p" ,
1215 "lint" : " eslint src test" ,
1316 "release" : " release" ,
7174 "babel-preset-latest" : " ^6.24.0" ,
7275 "babel-preset-react" : " ^6.23.0" ,
7376 "babel-preset-stage-2" : " ^6.18.0" ,
77+ "cross-env" : " ^5.0.1" ,
7478 "enzyme" : " ^3.0.0" ,
7579 "enzyme-adapter-react-16" : " ^1.0.0" ,
7680 "eslint" : " ^3.17.1" ,
Original file line number Diff line number Diff line change 1- import CSSTransition from './CSSTransition' ;
2- import ReplaceTransition from './ReplaceTransition' ;
3- import TransitionGroup from './TransitionGroup' ;
4- import Transition from './Transition' ;
5-
6-
7- module . exports = {
8- Transition,
9- TransitionGroup,
10- ReplaceTransition,
11- CSSTransition,
12- } ;
1+ export { default as CSSTransition } from './CSSTransition' ;
2+ export { default as ReplaceTransition } from './ReplaceTransition' ;
3+ export { default as TransitionGroup } from './TransitionGroup' ;
4+ export { default as Transition } from './Transition' ;
You can’t perform that action at this time.
0 commit comments