Code Monkey home page Code Monkey logo

nep-responder-local's Introduction

nep-responder-local

Usage

var nep_responder_local = require('nep-responder-local');


Config

{
  pattern: /https?\:abc\.com)\/(\?\?)?path\/to\/your/\file\//,
  responder: 'local',
  options: {
  	file: '/www/your/local/build',
	noMin: true,
	index: 'index.js'
  }
}

  • pattern: 必选,匹配的正则表达式,如需支持 CDN 文件合并,记得中间添加 (\?\?)? 的正则语句
  • responder: 必选,写local即可,若本地有多个node版本,可以写成: require('/path/to/your/global/node_modules/nep-responder-local/')
  • options.file:必选,需要查找的文件名,或者路径。
  • options.noMin:可选,开启了 noMin 会自动去掉 -min 后缀再去匹配本地路径
  • options.index:可选,当目标文件为目录时,会自动被上 options.index 作为最终目标文件

nep-responder-local's People

Contributors

bigfactory avatar

Watchers

 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.