summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-search/src/index.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-09-29 16:03:16 +0200
committerSamy Pesse <samypesse@gmail.com>2016-09-29 16:03:16 +0200
commit7f283791544195fa70c51003db9be3f029c014ef (patch)
tree4a5ac11ed2a3f1b6e6e0a8d3e7bedd641c0f186f /packages/gitbook-plugin-search/src/index.js
parent6f98ee18468e88af01a066eb6e203e4d6ef0a52c (diff)
downloadgitbook-7f283791544195fa70c51003db9be3f029c014ef.zip
gitbook-7f283791544195fa70c51003db9be3f029c014ef.tar.gz
gitbook-7f283791544195fa70c51003db9be3f029c014ef.tar.bz2
Fix dist command
Diffstat (limited to 'packages/gitbook-plugin-search/src/index.js')
-rw-r--r--packages/gitbook-plugin-search/src/index.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/gitbook-plugin-search/src/index.js b/packages/gitbook-plugin-search/src/index.js
index 94a5d35..c3b0253 100644
--- a/packages/gitbook-plugin-search/src/index.js
+++ b/packages/gitbook-plugin-search/src/index.js
@@ -3,11 +3,15 @@ const GitBook = require('gitbook-core');
const SearchInput = require('./components/Input');
const SearchResults = require('./components/Results');
const reducers = require('./reducers');
+const search = require('./actions/search');
-module.exports = GitBook.createPlugin(
- (dispatch, state) => {
+module.exports = GitBook.createPlugin({
+ init: (dispatch, getState) => {
dispatch(GitBook.registerComponent(SearchInput, { role: 'search:input' }));
dispatch(GitBook.registerComponent(SearchResults, { role: 'search:results' }));
},
- reducers
-);
+ reduce: reducers,
+ actions: {
+ search
+ }
+});