diff --git a/.travis.yml b/.travis.yml
index a006270c..31d3f5e6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,14 @@
language: node_js
node_js: 12
-script: npm run build
+install:
+ - npm i
+ - npm i --prefix examples/react-webpack
+ - npm i --prefix examples/vue-webpack
+
+script:
+ - npm run build
+ - npm run build:examples
deploy:
- provider: script
diff --git a/README.md b/README.md
index 6ae3130f..8abcc3b4 100644
--- a/README.md
+++ b/README.md
@@ -20,12 +20,19 @@ You can import and process styles manually by importing `dist/index.css` and
`dist/index-without-styles.js` separately. Or even you can don't import styles at
all, and write your own instead.
+### React and Vue versions
+By default `dist/index.js` is imported, instead of it, you can import a specific
+version for React or Vue by importing `dist/react-without-styles.js` or
+`dist/vue-without-styles.js` accordingly. The framework-specific version contains
+all features available in the default one plus specific for particular framework wrappers.
+
## Usage
-### Button (`superheroUtils.createButton`)
+### Button
+
+#### `superheroUtils.createButton`
This library exports a function that creates buttons. This function accepts arguments:
- class name of nodes that should become buttons, or the DOM node itself
- (this option simplifies integration into Frontend frameworks like Vue/React)
- options object
Option | Description
@@ -47,7 +54,7 @@ Option | Description
```
Select the button style you like the most and adopt this code to your website's HTML.
-Additional examples can be found [here](./index.html).
+Additional examples can be found [here](examples/index.html).
#### Screenshots
@@ -58,6 +65,24 @@ Size value | Screenshot
`medium` |
`large` |
+#### `superheroUtils.createButtonByDiv`
+
+The same function as the previous one except that the first argument should be an
+instance of `HTMLDivElement`. The button content will be added to that node instead of
+the DOM node replacing. The function with this interface simplifies integration into
+Frontend frameworks like Vue and React.
+
+#### `superheroUtils.Button` (only in React and Vue versions)
+
+The component that is compatible with the corresponding framework. Accepts the same
+properties as [`superheroUtils.createButton`](#superheroutilscreatebutton)'s options.
+
+#### Example
+
+```html
+
+```
+
### Paywall (`superheroUtils.ensurePaid`)
This function asks the user to send a tip to the specified page. It won't ask to send a
tip if it was sent before using the current browser. The function accepts options object.
@@ -73,7 +98,7 @@ Option | Description
superheroUtils.ensurePaid({ url: 'https://example.com' });
```
-Additional examples can be found [here](./index.html).
+Additional examples can be found [here](examples/index.html).
#### Screenshots
@@ -85,6 +110,8 @@ You need to install [Node.js](https://nodejs.org/) firstly.
```sh
$ npm install
+$ npm install --prefix examples/react-webpack
+$ npm install --prefix examples/vue-webpack
$ npm start
```
diff --git a/index.html b/examples/index.html
similarity index 96%
rename from index.html
rename to examples/index.html
index f4089142..44673877 100644
--- a/index.html
+++ b/examples/index.html
@@ -1,3 +1,12 @@
+
Sed eu convallis nisi. Proin aliquam diam eget risus venenatis pharetra. Sed varius commodo mauris eu accumsan. Donec erat tellus, vestibulum in efficitur non, aliquet eu leo. Aenean bibendum risus leo, ac consequat urna gravida ut. Proin ut justo eget ligula tempor euismod. Sed nec dui at est tristique ultrices et eu massa.
Suspendisse ut tempus nibh. Fusce placerat neque lacinia mi mattis hendrerit. Phasellus blandit sit amet nibh sed molestie. Praesent vulputate imperdiet mauris vitae lobortis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Mauris in tellus lacinia, imperdiet diam sit amet, porta nisl. In vehicula in elit ac dignissim. Curabitur vehicula sollicitudin molestie. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec convallis non odio a commodo.