Skip to content

Commit eb06984

Browse files
committed
PR feedback
1 parent b2f6df2 commit eb06984

File tree

8 files changed

+30
-1933
lines changed

8 files changed

+30
-1933
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
bower_components
22
node_modules
3-
coverage*
3+
coverage*
4+
dist
5+
src/pretender.es.js

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ with an express/sinatra style syntax for defining routes and their handlers.
1212
Pretender will temporarily replace native XMLHttpRequest and Fetch , intercept
1313
all requests, and direct them to little pretend service you've defined.
1414

15+
**:warning: Pretender only works in the browser!**
16+
1517
```javascript
1618
const PHOTOS = {
1719
"10": {
@@ -38,7 +40,13 @@ const server = new Pretender(function() {
3840
$.get('/photos/12', {success() => { ... }})
3941
```
4042
41-
## Usage examples
43+
## Usage
44+
45+
```
46+
yard add -D pretender
47+
# or
48+
npm install --save-dev pretender
49+
```
4250
4351
You can load Pretender directly in the browser.
4452
@@ -53,8 +61,6 @@ import Pretender from 'pretender';
5361
const server = new Pretender(function() {});
5462
```
5563
56-
Full example: [use-pretender-as-a-module](https://github.com/givanse/use-pretender-as-a-module)
57-
5864
## The Server DSL
5965
The server DSL is inspired by express/sinatra. Pass a function to the Pretender constructor
6066
that will be invoked with the Pretender instance as its context. Available methods are

0 commit comments

Comments
 (0)