koa-combo-answer
v1.1.0
Published
a middleware for koa. parse combo url for seajs-combo.
Downloads
6
Readme
koa-combo-answer
a middleware for koa. parse combo url for seajs-combo.
install
npm install koa-combo-answer --save
eg.
const path = require('path');
const app = require('koa')();
const comboAnswer = require('koa-combo-answer');
app.use(comboAnswer({
miniCSS: true,
comboSyntax: ['?', '&'],
base: path.resolve(__dirname, './htdocs')
}));
params
miniCSS(boolean)
Is compress css, default for false
base(string)
static files dir.
then
URL: http://www.example.com/js/lib/??a.js,b.js,c.js
URL: http://www.example.com/js/lib/?a.js&b.js&c.js
Request: http://www.example.com/js/lib/a.js
http://www.example.com/js/lib/b.js
http://www.example.com/js/lib/c.js