{"id":17801514,"url":"https://github.com/yiminghe/koa-modularize","last_synced_at":"2025-04-02T04:14:47.407Z","repository":{"id":22567612,"uuid":"25908979","full_name":"yiminghe/koa-modularize","owner":"yiminghe","description":"koa middleware for transforming commonjs file into browser module format","archived":false,"fork":false,"pushed_at":"2015-07-14T08:28:38.000Z","size":310,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T05:06:10.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yiminghe.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-29T07:12:55.000Z","updated_at":"2016-07-18T14:55:09.000Z","dependencies_parsed_at":"2022-08-20T20:20:29.688Z","dependency_job_id":null,"html_url":"https://github.com/yiminghe/koa-modularize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiminghe%2Fkoa-modularize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiminghe%2Fkoa-modularize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiminghe%2Fkoa-modularize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiminghe%2Fkoa-modularize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yiminghe","download_url":"https://codeload.github.com/yiminghe/koa-modularize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246752635,"owners_count":20827987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T12:38:39.635Z","updated_at":"2025-04-02T04:14:47.391Z","avatar_url":"https://github.com/yiminghe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koa-modularize\n---\n\nkoa middleware for transforming node_modules js file into browser module format and imported css path to absolute node_modules path\n\n[![NPM version][npm-image]][npm-url]\n[![gemnasium deps][gemnasium-image]][gemnasium-url]\n[![node version][node-image]][node-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/koa-modularize.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/koa-modularize\n[travis-image]: https://img.shields.io/travis/yiminghe/koa-modularize.svg?style=flat-square\n[travis-url]: https://travis-ci.org/yiminghe/koa-modularize\n[coveralls-image]: https://img.shields.io/coveralls/yiminghe/koa-modularize.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/yiminghe/koa-modularize?branch=master\n[gemnasium-image]: http://img.shields.io/gemnasium/yiminghe/koa-modularize.svg?style=flat-square\n[gemnasium-url]: https://gemnasium.com/yiminghe/koa-modularize\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.11-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n[download-image]: https://img.shields.io/npm/dm/koa-modularize.svg?style=flat-square\n[download-url]: https://npmjs.org/package/koa-modularize\n\n## Usage\n\n```javascript\nvar koa = require('koa');\nvar modularize = require('koa-modularize');\napp.use(modularize());\napp.listen(8000);\n```\n\n## Example\n\n```\nnpm start\n```\n\nopen  http://localhost:9999/test/test.html\n\n## API\n\n```javascript\nGeneratorFunction modularize(dir:String, option: Object)\n```\n\n### dir\n\nfile directory code belongs in. defaults to process.cwd()\n\n### Option details\n\u003ctable class=\"table table-bordered table-striped\"\u003e\n    \u003cthead\u003e\n    \u003ctr\u003e\n        \u003cth style=\"width: 100px;\"\u003ename\u003c/th\u003e\n        \u003cth style=\"width: 50px;\"\u003etype\u003c/th\u003e\n        \u003cth\u003edescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n      \u003ctr\u003e\n         \u003ctd\u003eoption.nowrap\u003c/td\u003e\n         \u003ctd\u003eFunction\u003c/td\u003e\n         \u003ctd\u003ewhether wrap code with define and transform package into absolute url for browser loader library\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd\u003eoption.next\u003c/td\u003e\n          \u003ctd\u003eFunction\u003c/td\u003e\n          \u003ctd\u003erequest handler will call this function to judge whether yield next\u003c/td\u003e\n      \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiminghe%2Fkoa-modularize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyiminghe%2Fkoa-modularize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiminghe%2Fkoa-modularize/lists"}