Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b3d8924

Browse files
Renames asyncBootstrapperTarget to asyncBootstrap.
Updates to v2 of `react-tree-walker`. Preps for v1 release.
1 parent 2db69af commit b3d8924

File tree

7 files changed

+420
-99
lines changed

7 files changed

+420
-99
lines changed

‎.gitignore‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ npm-debug.log
1111
# Jest
1212
coverage
1313

14-
# Build output
15-
umd
16-
commonjs
17-
build
18-
1914
# Flow
2015
flow-coverage
2116
flow-typed

‎commonjs/index.js‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use strict';
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
exports.default = asyncBootstrapper;
7+
8+
var _reactTreeWalker = require('react-tree-walker');
9+
10+
var _reactTreeWalker2 = _interopRequireDefault(_reactTreeWalker);
11+
12+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13+
14+
function asyncBootstrapper(app) {
15+
var visitor = function visitor(element, instance) {
16+
if (instance && typeof instance.asyncBootstrap === 'function') {
17+
return instance.asyncBootstrap();
18+
}
19+
return true;
20+
};
21+
22+
return (0, _reactTreeWalker2.default)(app, visitor, {})
23+
// Swallow errors.
24+
.catch(function () {
25+
return undefined;
26+
});
27+
}

‎package.json‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-async-bootstrapper",
3-
"version": "0.0.5",
3+
"version": "1.0.0",
44
"description": "Provides the ability to execute async bootstrapper functions within your React element tree.",
55
"license": "MIT",
66
"main": "commonjs/index.js",
@@ -53,45 +53,45 @@
5353
"app-root-dir": "1.0.2",
5454
"babel-cli": "6.24.0",
5555
"babel-core": "6.24.0",
56-
"babel-eslint": "7.1.1",
56+
"babel-eslint": "7.2.1",
5757
"babel-jest": "19.0.0",
5858
"babel-loader": "6.4.1",
5959
"babel-polyfill": "6.23.0",
60-
"babel-preset-env": "1.2.2",
60+
"babel-preset-env": "1.3.2",
6161
"babel-preset-latest": "6.24.0",
6262
"babel-preset-react": "6.23.0",
6363
"babel-preset-stage-3": "6.22.0",
6464
"babel-register": "6.24.0",
65-
"codecov": "2.0.2",
66-
"cross-env": "3.2.4",
67-
"enzyme": "2.7.1",
65+
"codecov": "2.1.0",
66+
"cross-env": "4.0.0",
67+
"enzyme": "2.8.0",
6868
"enzyme-to-json": "1.5.0",
69-
"eslint": "3.17.1",
69+
"eslint": "3.19.0",
7070
"eslint-config-airbnb": "14.1.0",
7171
"eslint-plugin-import": "2.2.0",
7272
"eslint-plugin-jsx-a11y": "4.0.0",
73-
"eslint-plugin-react": "6.10.0",
73+
"eslint-plugin-react": "6.10.3",
7474
"gzip-size": "3.0.0",
75-
"husky": "^0.13.2",
75+
"husky": "0.13.3",
7676
"in-publish": "2.0.0",
7777
"jest": "19.0.2",
7878
"lint-staged": "^3.4.0",
7979
"prettier": "^0.22.0",
80-
"prettier-eslint": "^4.3.2",
81-
"prettier-eslint-cli": "^3.1.2",
80+
"prettier-eslint": "4.4.0",
81+
"prettier-eslint-cli": "3.2.0",
8282
"pretty-bytes": "4.0.2",
8383
"ramda": "0.23.0",
8484
"react": "15.4.2",
8585
"react-addons-test-utils": "15.4.2",
8686
"react-dom": "15.4.2",
87-
"readline-sync": "1.4.6",
87+
"readline-sync": "1.4.7",
8888
"rimraf": "2.6.1",
89-
"sinon": "2.0.0",
90-
"webpack": "2.2.1",
89+
"sinon": "2.1.0",
90+
"webpack": "2.3.3",
9191
"webpack-dev-middleware": "1.10.1",
92-
"webpack-hot-middleware": "2.17.1"
92+
"webpack-hot-middleware": "2.18.0"
9393
},
9494
"dependencies": {
95-
"react-tree-walker": "^2.0.0-alpha.3"
95+
"react-tree-walker": "^2.0.0"
9696
}
9797
}

‎src/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import reactTreeWalker from 'react-tree-walker'
22

33
export default function asyncBootstrapper(app) {
44
const visitor = (element, instance) => {
5-
if (instance && typeof instance.asyncBootstrapperTarget === 'function') {
6-
return instance.asyncBootstrapperTarget()
5+
if (instance && typeof instance.asyncBootstrap === 'function') {
6+
return instance.asyncBootstrap()
77
}
88
return true
99
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /