Skip to content

matjs/mat-respond

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mat-respond

npm version

Installation

npm install --save-dev mat-respond

Usage

var mat  = require('mat');
var res  = require('mat-respond');

mat.task('online', function () {
  mat.use(res([
    // 将线上的js映射到本地
    {
      pattern: '/boot/index-min.js',
      responder: '/Users/naij/project/pub/boot/index.js'
    }, 
    // 将-min后缀的js映射到非-min的js
    {
      pattern: '(.*)-min.js',
      responder: '$1.js'
    }
  ]))
})
mat online

About

重写http请求的mat插件

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published