diff --git a/README.md b/README.md index 796358b..9297cc3 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ A Browser detector. Because sometimes, there is no other way, and not even good # Contents - [Overview](#overview) - [Use cases](#use-cases) +- [Advanced usage](#advanced-usage) - [How can I help?](#contributing) # Overview @@ -107,6 +108,12 @@ Thus, you can define OS or platform specific rules and they will have more prior More of API and possibilities you will find in the `docs` folder. +# Advanced Usage +By default, `require('bowser')` requires the pre-compiled file, which can +include useless for you polyfills. In case you don't need that, you can choose +using source file requiring bowser like that: `require('bowser/src/bowser`); +Then you get ES2015 file, which is not precompiled and can be easier to debug. + # Contributing If you'd like to contribute a change to bowser, modify the files in `src/`, then run the following (you'll need node + npm installed): diff --git a/package.json b/package.json index db8b88b..a871212 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "http://twitter.com/lancedikson" } ], - "main": "./src/bowser.js", + "main": "./dist/bowser.compiled.js", "typings": "./typings.d.ts", "repository": { "type": "git",