Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 604 Bytes

README.md

File metadata and controls

35 lines (28 loc) · 604 Bytes

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