bdsm

Bad ass client side mocking solution

BDSM has changed its name, please install mimic to recieve further updates. Please visit https://mimic.js.org for more details
Last updated 4 years ago by morsdyce .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bdsm 
SYNC missed versions from official npm registry.

bdsm

Bad ass server mocks

Build Status npm version

short introduction

Using BDSM in your project

Add to your packages:

npm install bdsm --save

Require in your app:

import 'bdsm';

Once you reload the application, the BDSM logo will appear in bottom right corner.

Enjoy!

Using Mocks tracked by git

If you want to use mocks which will be committed into git and you're using webpack you can use the following code to import the mocks on application start:

import bdsm from 'bdsm';
const mocks = require.context(__dirname + '/mocks', true, /\.json$/);
mocks.keys().forEach((key) => bdsm.import(JSON.stringify(mocks(key))));

This assumes your mocks are placed in the mocks directory which is located at the root of the project. In the mocks directory you have exports for either complete scenarios or separate mock requests.

Contributing to BDSM

  1. Clone the repo

  2. Install dependencies (at the root of the repo):

    npm install
    
  3. Run the project

    npm start
    
  4. Build for deployment

    npm run build
    

Current Tags

  • 1.0.3                                ...           latest (4 years ago)
  • 1.0.4-beta.3                                ...           next (4 years ago)
  • 1.0.4-beta.6                                ...           react-native (4 years ago)

19 Versions

  • 1.0.4-beta.6                                ...           4 years ago
  • 1.0.4-beta.5                                ...           4 years ago
  • 1.0.4-beta.4                                ...           4 years ago
  • 1.0.4-beta.3                                ...           4 years ago
  • 1.0.4-beta.2                                ...           4 years ago
  • 1.0.4-beta.1                                ...           4 years ago
  • 1.0.3 [deprecated]           ...           4 years ago
  • 1.0.3-beta.6                                ...           4 years ago
  • 1.0.3-beta.5                                ...           4 years ago
  • 1.0.3-beta.4                                ...           4 years ago
  • 1.0.3-beta.3                                ...           4 years ago
  • 1.0.3-beta.2                                ...           4 years ago
  • 1.0.3-beta.1                                ...           4 years ago
  • 1.0.2 [deprecated]           ...           4 years ago
  • 1.0.1 [deprecated]           ...           4 years ago
  • 0.2.2 [deprecated]           ...           7 years ago
  • 0.2.1 [deprecated]           ...           7 years ago
  • 0.2.0 [deprecated]           ...           7 years ago
  • 0.1.0 [deprecated]           ...           7 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (65)

Copyright 2014 - 2016 © taobao.org |