Skip to content

soonwang/koa-http-concat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

koa http concat

A koa middleware for concatenating files in a given context: CSS and JS files usually.

Reference http-cancat

NPM version

Install

npm i koa-http-concat -S

Usage

Server Side

const path = require('path');
const Koa = require('koa');
const koaHttpConcat = require('koa-http-concat');

const app = new Koa();

app.use(koaHttpConcat({
	base: path.join(__dirname, 'public'),
	path: '/'
}));

app.listen(3000);

Client Side

http://example.com/??script1.js,script2.js,build/script.js
http://example.com/??script1.js,script2.js,build/script.js?v=2016
http://example.com/??style1.css,style2.css,build/style.css
http://example.com/??style1.css,style2.css,build/style.css?v=2016

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published