Skip to content

Commit d14570a

Browse files
authored
Merge pull request #161 from nucliweb/fix/commands
doc: Remove $ symbol in the command scripts
2 parents b39a4cd + 3a9e87c commit d14570a

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@ WebPageTest API Wrapper is a [NPM](https://npmjs.org) package that wraps [WebPag
1212
## Getting started
1313

1414
```bash
15-
$ npm install webpagetest -g
15+
npm install webpagetest -g
1616
```
1717

1818
## Basics
1919

2020
### Command line
2121

2222
```bash
23-
$ webpagetest test https://docs.webpagetest.org/api/integrations/
23+
webpagetest test https://docs.webpagetest.org/api/integrations/
2424
```
2525

2626
### Docker
2727

2828
#### Build
2929

3030
```bash
31-
$ docker build -t webpagetest-api .
31+
docker build -t webpagetest-api .
3232
```
3333

3434
#### Run
3535

3636
```bash
37-
$ docker run -it --rm webpagetest-api -k YOURAPIKEY test https://docs.webpagetest.org/api/integrations/
37+
docker run -it --rm webpagetest-api -k YOURAPIKEY test https://docs.webpagetest.org/api/integrations/
3838
```
3939

4040
### Module
@@ -53,7 +53,7 @@ wpt.runTest("https://docs.webpagetest.org/api/integrations/", (err, data) => {
5353
### Help
5454

5555
```bash
56-
$ webpagetest --help
56+
webpagetest --help
5757
```
5858

5959
### Commands
@@ -268,7 +268,7 @@ $ webpagetest locations
268268
#### 2. Get API available locations
269269

270270
```bash
271-
$ webpagetest locations --key 1F2A3K4E5
271+
webpagetest locations --key 1F2A3K4E5
272272
```
273273

274274
```javascript
@@ -299,7 +299,7 @@ $ webpagetest locations --key 1F2A3K4E5
299299
#### 3. Run test on https://docs.webpagetest.org/api/integrations/ from San Jose on IE9
300300

301301
```bash
302-
$ webpagetest test https://docs.webpagetest.org/api/integrations/ --key 1F2A3K4E5 --location SanJose_IE9
302+
webpagetest test https://docs.webpagetest.org/api/integrations/ --key 1F2A3K4E5 --location SanJose_IE9
303303
```
304304

305305
```javascript
@@ -321,7 +321,7 @@ $ webpagetest test https://docs.webpagetest.org/api/integrations/ --key 1F2A3K4E
321321
#### 4. Check current test status
322322

323323
```bash
324-
$ webpagetest status 121025_PT_N8K
324+
webpagetest status 121025_PT_N8K
325325
```
326326

327327
```javascript
@@ -342,7 +342,7 @@ $ webpagetest status 121025_PT_N8K
342342
#### 5. Get test results
343343

344344
```bash
345-
$ webpagetest results 121025_PT_N8K
345+
webpagetest results 121025_PT_N8K
346346
```
347347

348348
```javascript
@@ -377,7 +377,7 @@ $ webpagetest results 121025_PT_N8K
377377
#### 6. Get test waterfall thumbnail from repeat view as data URI
378378

379379
```bash
380-
$ webpagetest waterfall 121025_PT_N8K --thumbnail --cached --uri
380+
webpagetest waterfall 121025_PT_N8K --thumbnail --cached --uri
381381
```
382382

383383
```javascript
@@ -390,7 +390,7 @@ $ webpagetest waterfall 121025_PT_N8K --thumbnail --cached --uri
390390
#### 7. Get remaining tests count for the account
391391

392392
```bash
393-
$ webpagetest testBalance --key 1F2A3K4E5
393+
webpagetest testBalance --key 1F2A3K4E5
394394
```
395395

396396
```javascript
@@ -404,13 +404,13 @@ $ webpagetest testBalance --key 1F2A3K4E5
404404
#### Run test on https://docs.webpagetest.org/api/integrations/ and poll results every 5 seconds timing out in 60 seconds
405405

406406
```bash
407-
$ webpagetest test https://docs.webpagetest.org/api/integrations/ --poll 5 --timeout 60
407+
webpagetest test https://docs.webpagetest.org/api/integrations/ --poll 5 --timeout 60
408408
```
409409

410410
#### Or run test on https://docs.webpagetest.org/api/integrations/ and wait for results listening on localhost\* port 8000\*\*
411411

412412
```bash
413-
$ webpagetest test https://docs.webpagetest.org/api/integrations/ --wait 8000
413+
webpagetest test https://docs.webpagetest.org/api/integrations/ --wait 8000
414414
```
415415

416416
```javascript
@@ -753,7 +753,7 @@ WebPageTest API Wrapper comes with a handy RESTful API proxy
753753
### Command Line
754754

755755
```bash
756-
$ webpagetest listen 8080 --server wpt.foo.com
756+
webpagetest listen 8080 --server wpt.foo.com
757757
```
758758

759759
```bash
@@ -762,12 +762,12 @@ http://localhost:8080
762762
```
763763

764764
```bash
765-
$ curl http://localhost:8080/help
766-
$ curl http://localhost:8080/test/webpagetest.org/?location=SanJose_IE9
765+
curl http://localhost:8080/help
766+
curl http://localhost:8080/test/webpagetest.org/?location=SanJose_IE9
767767
```
768768

769769
```bash
770-
$ webpagetest listen 8443 --key key.pem --cert cert.pem --server wpt.foo.com
770+
webpagetest listen 8443 --key key.pem --cert cert.pem --server wpt.foo.com
771771
```
772772

773773
```bash
@@ -803,12 +803,12 @@ Batch command is available as command line only and loads a batch file containin
803803
By running
804804

805805
```bash
806-
$ webpagetest batch commands.txt
806+
webpagetest batch commands.txt
807807
```
808808

809809
where `commands.txt` contains:
810810

811-
```
811+
```bash
812812
test https://docs.webpagetest.org/api/integrations/ --first --location foo
813813
test https://docs.webpagetest.org/api/integrations/ --first --location bar
814814
```
@@ -837,15 +837,15 @@ It schedules the 2 tests above returning an array of size 2 in the same order as
837837
With exit status 0 in case none of commands returns an error:
838838

839839
```bash
840-
$ echo $?
840+
echo $?
841841
0
842842
```
843843

844844
By running multiple sync tests, i.e. with either `--poll` or `--wait`, all tests are scheduled and results are polled or wait in parallel; meaning, if tests are set to run in different locations or same location with multiple agents, the final result might come together, but the result array will only return once _all_ tests are done. e.g.:
845845

846846
`commands.txt`:
847847

848-
```
848+
```bash
849849
test https://docs.webpagetest.org/api/integrations/ --first --location foo --poll --timeout 60
850850
test https://docs.webpagetest.org/api/integrations/ --first --location bar --poll --timeout 60
851851
```
@@ -859,7 +859,7 @@ WebPageTest API Wrapper provides a simple seamless way to integrate WebPageTest
859859
## Tests
860860

861861
```bash
862-
$ npm test
862+
npm test
863863
```
864864

865865
## Issues

0 commit comments

Comments
 (0)