Skip to content

Commit

Permalink
fix: expose main dist/ instead of index.js
Browse files Browse the repository at this point in the history
This is necessary as we are releasing a builded package that should
work with browserify/webpack/es5 environment
  • Loading branch information
vvo committed Sep 17, 2015
1 parent b10276a commit 98bd889
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@ API is unstable. We welcome any idea.

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Setup

### npm

```sh
npm install instantsearch.js --save-dev
```

### `<script>`

instantsearch.js is available on [jsDelivr](http://www.jsdelivr.com/):

```html
<script src="//cdn.jsdelivr.net/instantsearch/0/instantsearch.min.js"></script>
```


## Usage

```js
Expand Down
3 changes: 2 additions & 1 deletion example/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var instantsearch = require('../');
// force using index because package 'main' is dist/
var instantsearch = require('../index');

var search = instantsearch({
appId: 'latency',
Expand Down
11 changes: 2 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@
"name": "instantsearch.js",
"version": "0.0.0",
"description": "Instant search kit for Algolia search",
"main": "index.js",
"main": "dist/instantsearch.js",
"author": "Algolia <support@algolia.com>",
"scripts": {
"lint": "./scripts/lint.sh",
"build": "./scripts/build.sh",
"watch": "webpack --watch",
"dev": "./scripts/dev.sh",
"test": "./scripts/test.sh && npm run lint",
"test:watch": "nodemon -i node_modules/ -i coverage/ -i .git/ -i dist/ -q --exec './scripts/test.sh | tap-spec'",
"release": "./scripts/release.sh",
"doctoc": "doctoc --maxlevel 3 README.md"
},
"browserify": {
"transform": [
"babelify"
]
},
"browser": {
"lodash": "lodash-compat"
},
"repository": "algolia/intantsearch.js",
"devDependencies": {
"babel": "5.8.23",
Expand Down

0 comments on commit 98bd889

Please sign in to comment.