{"id":13798799,"url":"https://github.com/chosecz/koa-less","last_synced_at":"2025-04-12T23:43:56.160Z","repository":{"id":13112143,"uuid":"15793827","full_name":"chosecz/koa-less","owner":"chosecz","description":"Less middleware for Koa","archived":false,"fork":false,"pushed_at":"2014-07-24T07:43:12.000Z","size":195,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T17:47:40.777Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chosecz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-10T09:29:39.000Z","updated_at":"2021-11-09T10:45:19.000Z","dependencies_parsed_at":"2022-09-15T21:22:20.250Z","dependency_job_id":null,"html_url":"https://github.com/chosecz/koa-less","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/chosecz%2Fkoa-less","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chosecz%2Fkoa-less/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chosecz%2Fkoa-less/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chosecz%2Fkoa-less/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chosecz","download_url":"https://codeload.github.com/chosecz/koa-less/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248151550,"owners_count":21056130,"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-08-04T00:00:53.819Z","updated_at":"2025-04-12T23:43:56.136Z","avatar_url":"https://github.com/chosecz.png","language":"JavaScript","funding_links":[],"categories":["仓库"],"sub_categories":["中间件"],"readme":"# koa-less\n\nLess middleware for Koa\n\n## Installation\n\n```js\n$ npm install koa-less\n```\n\n## Example\n\n```js\nvar less = require('koa-less');\nvar serve = require('koa-static');\nvar koa = require('koa');\nvar app = koa();\n\napp.use(less('./public'));\n\napp.use(serve('./public'));\n\napp.listen(3000);\n```\n\n## Options\n\nSee [the less middleware document](https://github.com/emberfeather/less.js-middleware).\n\nExample of use:   \n```js\nvar path=require('path');\napp.use(require('koa-less')('/my/less/source/path', {\n  dest: path.join(__dirname, 'public')\n}));\n```\n\n## Troubleshooting\n\n### My less never recompiles, even when I use `{force: true}`!\n\nMake sure you're declaring less-middleware before your static middleware, if you're using the same directory, e.g. (with koa-static):\n\n\n```js\nvar lessMiddleware = require('koa-less');\nvar app = koa();\napp.use(lessMiddleware(__dirname + '/public'));\napp.use(require('koa-static')(__dirname + '/public'));\n```\n\n### IIS\n\nIf you are hosting your app on IIS you will have to modify your `web.config` file in order to allow NodeJS to serve your CSS static files.  IIS will cache your CSS files, bypassing NodeJS static file serving, which in turn does not allow the middleware to recompile your LESS files.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchosecz%2Fkoa-less","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchosecz%2Fkoa-less","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchosecz%2Fkoa-less/lists"}