-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92f5f32
commit b04a376
Showing
50 changed files
with
1,207 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"presets": ["es2015", "react", "stage-0"] | ||
"presets": ["es2015", "react", "stage-1"], | ||
"plugins": [ | ||
"transform-es3-member-expression-literals", | ||
"transform-es3-property-literals" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
examples/*/node_modules/ | ||
examples/*/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "rackt", | ||
"rules": { | ||
"react/jsx-uses-react": 1, | ||
"react/jsx-no-undef": 2, | ||
"react/wrap-multilines": 2 | ||
}, | ||
"plugins": [ | ||
"react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,5 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# 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 | ||
lib | ||
node_modules | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
.idea | ||
lib | ||
coverage | ||
*.log | ||
.idea |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## [0.0.3](https://github.com/misterfresh/react-easy-transition/compare/v0.0.2...v0.0.3) | ||
|
||
- Server rendering now works as expected. [Issue #1](https://github.com/misterfresh/react-easy-transition/issues/1) | ||
- Added optional leaveStyle parameter [PR #1](https://github.com/misterfresh/react-easy-transition/pull/2) | ||
- Bumped dependencies [PR #3](https://github.com/misterfresh/react-easy-transition/pull/3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
*.log | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
/** | ||
* This action type will be dispatched by the history actions below. | ||
* If you're writing a middleware to watch for navigation events, be sure to | ||
* look for actions of this type. | ||
*/ | ||
var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; | ||
|
||
function updateLocation(method) { | ||
return function () { | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
|
||
return { | ||
type: CALL_HISTORY_METHOD, | ||
payload: { method: method, args: args } | ||
}; | ||
}; | ||
} | ||
|
||
/** | ||
* These actions correspond to the history API. | ||
* The associated routerMiddleware will capture these events before they get to | ||
* your reducer and reissue them as the matching function on your history. | ||
*/ | ||
var push = exports.push = updateLocation('push'); | ||
var replace = exports.replace = updateLocation('replace'); | ||
var go = exports.go = updateLocation('go'); | ||
var goBack = exports.goBack = updateLocation('goBack'); | ||
var goForward = exports.goForward = updateLocation('goForward'); | ||
|
||
var routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined; | ||
|
||
var _reducer = require('./reducer'); | ||
|
||
Object.defineProperty(exports, 'LOCATION_CHANGE', { | ||
enumerable: true, | ||
get: function get() { | ||
return _reducer.LOCATION_CHANGE; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'routerReducer', { | ||
enumerable: true, | ||
get: function get() { | ||
return _reducer.routerReducer; | ||
} | ||
}); | ||
|
||
var _actions = require('./actions'); | ||
|
||
Object.defineProperty(exports, 'CALL_HISTORY_METHOD', { | ||
enumerable: true, | ||
get: function get() { | ||
return _actions.CALL_HISTORY_METHOD; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'push', { | ||
enumerable: true, | ||
get: function get() { | ||
return _actions.push; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'replace', { | ||
enumerable: true, | ||
get: function get() { | ||
return _actions.replace; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'go', { | ||
enumerable: true, | ||
get: function get() { | ||
return _actions.go; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'goBack', { | ||
enumerable: true, | ||
get: function get() { | ||
return _actions.goBack; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'goForward', { | ||
enumerable: true, | ||
get: function get() { | ||
return _actions.goForward; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'routerActions', { | ||
enumerable: true, | ||
get: function get() { | ||
return _actions.routerActions; | ||
} | ||
}); | ||
|
||
var _sync = require('./sync'); | ||
|
||
var _sync2 = _interopRequireDefault(_sync); | ||
|
||
var _middleware = require('./middleware'); | ||
|
||
var _middleware2 = _interopRequireDefault(_middleware); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
|
||
exports.syncHistoryWithStore = _sync2['default']; | ||
exports.routerMiddleware = _middleware2['default']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports['default'] = routerMiddleware; | ||
|
||
var _actions = require('./actions'); | ||
|
||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | ||
|
||
/** | ||
* This middleware captures CALL_HISTORY_METHOD actions to redirect to the | ||
* provided history object. This will prevent these actions from reaching your | ||
* reducer or any middleware that comes after this one. | ||
*/ | ||
function routerMiddleware(history) { | ||
return function () { | ||
return function (next) { | ||
return function (action) { | ||
if (action.type !== _actions.CALL_HISTORY_METHOD) { | ||
return next(action); | ||
} | ||
|
||
var _action$payload = action.payload; | ||
var method = _action$payload.method; | ||
var args = _action$payload.args; | ||
|
||
history[method].apply(history, _toConsumableArray(args)); | ||
}; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.