npm install --save-dev mat-respond
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