Skip to content

Commit 4b7e0d9

Browse files
committed
Update information
1 parent 15d5132 commit 4b7e0d9

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,23 @@
99
It uses [Selenium](https://www.seleniumhq.org/)(Chrome) under the hood.
1010

1111
## Install
12+
Using npm:
1213
```
1314
npm install remote-screen-capture
1415
```
1516

17+
Using yarn:
18+
```
19+
yarn add remote-screen-capture
20+
```
21+
1622
## Usage
23+
> *NOTE:* If you using ES6+ just import statements
1724
1825
Promise-based:
1926
```javascript
20-
import RemoteScreenCapture from 'remote-screen-capture';
27+
// Or
28+
const RemoteScreenCapture = require('remote-screen-capture').RemoteScreenCapture;
2129

2230
// If you want to encoded data
2331
RemoteScreenCapture.take('https://www.google.com').toPromise().then(chunks => {
@@ -35,7 +43,7 @@ const saveFilePath = await RemoteScreenCapture.take('https://www.google.com', '.
3543

3644
Observable-based:
3745
```javascript
38-
import RemoteScreenCapture from 'remote-screen-capture';
46+
const RemoteScreenCapture = require('remote-screen-capture').RemoteScreenCapture;
3947

4048
// If you want to encoded data
4149
RemoteScreenCapture.take('https://www.google.com').subscribe(chunks => {

dist/remote-screen-capture.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/remote-screen-capture.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
"description": "Capture screenshots using selenium",
66
"main": "./dist/index.js",
77
"types": "./dist/index.ts",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/webhacking/remote-screen-capture.git"
11+
},
12+
"bugs": {
13+
"url": "https:/github.com/webhacking/remote-screen-capture/issues"
14+
},
15+
"homepage": "https:/github.com/webhacking/remote-screen-capture",
816
"scripts": {
917
"format": "./node_modules/.bin/prettier --write \"**/*.ts\"",
1018
"test": "./node_modules/.bin/jest --testPathIgnorePatterns dist",
@@ -17,7 +25,8 @@
1725
"remote",
1826
"screen-capture",
1927
"capture-from-url",
20-
"screenshot"
28+
"screenshot",
29+
"node"
2130
],
2231
"license": "ISC",
2332
"dependencies": {

0 commit comments

Comments
 (0)