{"id":28468610,"url":"https://github.com/cnwhy/res-minify","last_synced_at":"2025-07-01T14:31:16.895Z","repository":{"id":57354431,"uuid":"45824321","full_name":"cnwhy/res-minify","owner":"cnwhy","description":"自动压缩合并js css, express中间件","archived":false,"fork":false,"pushed_at":"2017-04-27T09:08:10.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-07T08:08:01.175Z","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/cnwhy.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":"2015-11-09T08:14:08.000Z","updated_at":"2016-05-20T06:39:02.000Z","dependencies_parsed_at":"2022-09-12T05:41:16.244Z","dependency_job_id":null,"html_url":"https://github.com/cnwhy/res-minify","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/cnwhy/res-minify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnwhy%2Fres-minify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnwhy%2Fres-minify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnwhy%2Fres-minify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnwhy%2Fres-minify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnwhy","download_url":"https://codeload.github.com/cnwhy/res-minify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnwhy%2Fres-minify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262980967,"owners_count":23394440,"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":"2025-06-07T08:08:03.871Z","updated_at":"2025-07-01T14:31:16.874Z","avatar_url":"https://github.com/cnwhy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"自动压缩合并js css,自动编译Less, express中间件\n\ndemo:  \n```\nvar resminify = require(\"res-minify\")\napp.use(resminify(path.join(__dirname, 'public')));\napp.use(\"/v2\",resminify(path.join(__dirname, 'public'),{\"reAbsolute\":true}));\n```\n\n##API resminify(path,options)\n*path* 物理路径\n*options* 配置\n```js\n//defined\n{\n    \"compressCSS\": true     //css压缩\n    ,\"reAbsolute\": false    //是否转换CSS中原有的绝对路径\n    ,\"compressJS\": true     //js压缩\n    ,\"compileLess\": true    //编译Less文件\n    ,\"serverCache\":true     //服务器缓存\n    ,\"fileMaxAge\":604800    //浏览器缓存时间\n    ,\"cacheFilePaths\": \"\"   //缓存目录 不设置则缓存到内存\n    ,\"directoryList\":false  //目录浏览\n    ,\"defaultFile\":[\"index.html\",\"index.htm\",\"default.html\",\"default.htm\"]  //默认文件,开启目录浏览后失效;\n    ,\"baseUrl\":undefined    //reAbsolute 转换绝对路径的时前缀,默认取值req.baseUrl\n}\n```\n\n*自动合并访问规则*\nhttp:/XXX/js/??a.js,b.js  \nhttp:/XXX/css/??a.css,b.css\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnwhy%2Fres-minify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnwhy%2Fres-minify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnwhy%2Fres-minify/lists"}