summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-search/src/index.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-09-28 18:14:35 +0200
committerSamy Pesse <samypesse@gmail.com>2016-09-28 18:14:35 +0200
commit287c80b2e116572669f2a7073731ba7350e3619a (patch)
tree1572bab423b927e16bca4d56020aeec6442fe1a9 /packages/gitbook-plugin-search/src/index.js
parent26fc021b900f6b28a180fa8360313b3193e6bf5e (diff)
downloadgitbook-287c80b2e116572669f2a7073731ba7350e3619a.zip
gitbook-287c80b2e116572669f2a7073731ba7350e3619a.tar.gz
gitbook-287c80b2e116572669f2a7073731ba7350e3619a.tar.bz2
Start search plugin
Diffstat (limited to 'packages/gitbook-plugin-search/src/index.js')
-rw-r--r--packages/gitbook-plugin-search/src/index.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/gitbook-plugin-search/src/index.js b/packages/gitbook-plugin-search/src/index.js
new file mode 100644
index 0000000..94a5d35
--- /dev/null
+++ b/packages/gitbook-plugin-search/src/index.js
@@ -0,0 +1,13 @@
+const GitBook = require('gitbook-core');
+
+const SearchInput = require('./components/Input');
+const SearchResults = require('./components/Results');
+const reducers = require('./reducers');
+
+module.exports = GitBook.createPlugin(
+ (dispatch, state) => {
+ dispatch(GitBook.registerComponent(SearchInput, { role: 'search:input' }));
+ dispatch(GitBook.registerComponent(SearchResults, { role: 'search:results' }));
+ },
+ reducers
+);