File tree 3 files changed +21
-10
lines changed
3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,23 @@ API is unstable. We welcome any idea.
28
28
29
29
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
30
30
31
+ ## Setup
32
+
33
+ ### npm
34
+
35
+ ``` sh
36
+ npm install instantsearch.js --save-dev
37
+ ```
38
+
39
+ ### ` <script> `
40
+
41
+ instantsearch.js is available on [ jsDelivr] ( http://www.jsdelivr.com/ ) :
42
+
43
+ ``` html
44
+ <script src =" //cdn.jsdelivr.net/instantsearch/0/instantsearch.min.js" ></script >
45
+ ```
46
+
47
+
31
48
## Usage
32
49
33
50
``` js
Original file line number Diff line number Diff line change 1
- var instantsearch = require ( '../' ) ;
1
+ // force using index because package 'main' is dist/
2
+ var instantsearch = require ( '../index' ) ;
2
3
3
4
var search = instantsearch ( {
4
5
appId : 'latency' ,
Original file line number Diff line number Diff line change 2
2
"name" : " instantsearch.js" ,
3
3
"version" : " 0.0.0" ,
4
4
"description" : " Instant search kit for Algolia search" ,
5
- "main" : " index .js" ,
5
+ "main" : " dist/instantsearch .js" ,
6
6
"author" :
" Algolia <[email protected] >" ,
7
7
"scripts" : {
8
8
"lint" : " ./scripts/lint.sh" ,
9
9
"build" : " ./scripts/build.sh" ,
10
+ "watch" : " webpack --watch" ,
10
11
"dev" : " ./scripts/dev.sh" ,
11
12
"test" : " ./scripts/test.sh && npm run lint" ,
12
13
"test:watch" : " nodemon -i node_modules/ -i coverage/ -i .git/ -i dist/ -q --exec './scripts/test.sh | tap-spec'" ,
13
14
"release" : " ./scripts/release.sh" ,
14
15
"doctoc" : " doctoc --maxlevel 3 README.md"
15
16
},
16
- "browserify" : {
17
- "transform" : [
18
- " babelify"
19
- ]
20
- },
21
- "browser" : {
22
- "lodash" : " lodash-compat"
23
- },
24
17
"repository" : " algolia/intantsearch.js" ,
25
18
"devDependencies" : {
26
19
"babel" : " 5.8.23" ,
You can’t perform that action at this time.
0 commit comments