diff --git a/README.md b/README.md index 97b1da5d..1eb7b524 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,12 @@ var bsn = require("bootstrap.native"); var btn = new bsn.Button(element,'loading'); ``` +Additionally, to use V4, you can do the following: +``` +var bsn = require('bootstrap.native/dist/bootstrap-native-v4'); +var btn = new bsn.Button(element,'loading'); +``` + **Note:** If you are working in a virtual browser environment (i.e. running front-end tests in NodeJS), `bootstrap.native` requires both `window` and `document` to be in scope. You will need to use a mock browser. diff --git a/v4.html b/v4.html index 4247f278..9887e5ec 100644 --- a/v4.html +++ b/v4.html @@ -153,8 +153,10 @@

npm/Bower

$ bower install --save bootstrap.native -

In order to be able to use V4, after you have installed the package you need to edit the bower.json and/or package.json to use the V4 as main file:

-
"main": "dist/bootstrap-native-v4.js",
+

In order to be able to use V4, after you have installed the package you can do the following:

+
var bsn = require('bootstrap.native/dist/bootstrap-native-v4');
+var btn = new bsn.Button(element, 'text');
+

Examples

Alert