Git Product home page Git Product logo

grunt-restful-mock-mayiuu's Introduction

grunt-restful-mock

模拟 AJAX 请求返回的 JSON 数据,减少前端工程师对后端接口的依赖,在接口规范的基础之上,实现与后端并行开发。

目录

特性

  • 基于数据模板生成随机数据
  • 支持 RESTful 风格的 RUI
  • 兼容 JSONP 请求
  • 模拟 HTTPOnly 的 Cookie
  • 模拟 HTTP 响应状态码,模拟请求超时,模拟网络延时
  • 热重启,修改 mock 配置后自动重启服务
  • 自定义数据模板占位符

意义

使用过 mockjax 的同学应该遇到过一个 苦恼的问题,那就是需要在业务代码中添加许多调试用的 mock 配置,上线时需要人肉删除这些 JS 代码,具有侵入性且容易出错,同时 mock 环境和测试环境的切换也不是很方便。作者在经历过这些痛点 之后,基于 grunt 开发了该插件。

历史

  • 2015-04-02 发布版本 0.1.21,将依赖项 gaze 的版本从 0.6.4 降为 0.5.1,以修复 NodeJS v0.12 导致的问题,issues
  • 2015-03-03 增加 fromFile 占位符,支持从文件中获取 json 数据
  • 2014-12-27 增加自定义占位符接口
  • 2014-12-04 组合 HTTP 谓词(get|post),谓词混同参数(get[param1=value1]
  • 2014-12-03 更新 connect 到最新的 v3.3.3,修复一些被弃用的方法。
  • 2014-12-02 重构 random,将 random 按类别分放在不同的文件中。

grunt-restful-mock-mayiuu's People

Contributors

bubkoo avatar xiao1dian avatar maxjchuang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.