koa-modularize

3.6.9 • Public • Published

koa-modularize


koa middleware for transforming node_modules js file into browser module format and imported css path to absolute node_modules path

NPM version gemnasium deps node version npm download

Usage

var koa = require('koa');
var modularize = require('koa-modularize');
app.use(modularize());
app.listen(8000);

Example

npm start

open http://localhost:9999/test/test.html

API

GeneratorFunction modularize(dir:String, option: Object)

dir

file directory code belongs in. defaults to process.cwd()

Option details

name type description
option.nowrap Function whether wrap code with define and transform package into absolute url for browser loader library
option.next Function request handler will call this function to judge whether yield next

Dependents (2)

Package Sidebar

Install

npm i koa-modularize

Weekly Downloads

53

Version

3.6.9

License

MIT

Last publish

Collaborators

  • yiminghe