{"id":19279006,"url":"https://github.com/krasimir/less-compiler","last_synced_at":"2025-04-11T22:42:49.803Z","repository":{"id":5834331,"uuid":"7050115","full_name":"krasimir/less-compiler","owner":"krasimir","description":"Watch and compile your .less files automatically","archived":false,"fork":false,"pushed_at":"2012-12-16T14:07:55.000Z","size":168,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T23:37:12.460Z","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/krasimir.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2012-12-07T08:33:22.000Z","updated_at":"2013-11-21T19:21:56.000Z","dependencies_parsed_at":"2022-08-31T21:24:20.581Z","dependency_job_id":null,"html_url":"https://github.com/krasimir/less-compiler","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/krasimir%2Fless-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasimir%2Fless-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasimir%2Fless-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasimir%2Fless-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krasimir","download_url":"https://codeload.github.com/krasimir/less-compiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492995,"owners_count":21113159,"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-11-09T21:12:57.539Z","updated_at":"2025-04-11T22:42:49.774Z","avatar_url":"https://github.com/krasimir.png","language":"JavaScript","readme":"# less-compiler\n\nThe main purpose of the module is to compile your .less files automatically. It uses [watchr](https://npmjs.org/package/watchr) to monitor a specific folder for changes and [less](https://npmjs.org/package/less) for compilation. There are some other tools for the same purpose ([less-middleware](https://npmjs.org/package/less-middleware), [less-watch](https://npmjs.org/package/less-watch)) out there, but I needed completelly node based thingy - without the usage of the command line. I.e. something that I could add in my node project without the usage of [express](http://expressjs.com/).\n\n## Requirements\n[NodeJS](http://nodejs.org/)\n\n## Installation\n\n    npm install lesscompile\n\n## Usage\n\n    require(\"lesscompile\").init({\n        pathToWatch: [path to your less files],\n        fileToCompile: [your main less file],\n        destination: [.css file as a destination],\n        watchForChanges: [true or false, true by default]\n    });\n\nexample: \n\n    require(\"lesscompile\").init({\n        pathToWatch: __dirname + \"/less\",\n        fileToCompile: __dirname + \"/less/main.less\",\n        destination: __dirname + \"/compiled/styles.css\",\n        watchForChanges: true\n    });\n\nor with callback: \n\n    require(\"lesscompile\").init({\n        pathToWatch: __dirname + \"/less\",\n        fileToCompile: __dirname + \"/less/main.less\",\n        destination: __dirname + \"/compiled/styles.css\"\n    }).onCompile(function(css) {\n        console.log(\"the compiled css: \", css);\n    });\n\nIf you need to know when the compiler started to watch:\n\n    require(\"lesscompile\").init({\n        pathToWatch: __dirname + \"/less\",\n        fileToCompile: __dirname + \"/less/main.less\",\n        destination: __dirname + \"/compiled/styles.css\"\n    }).ready(function() {\n        console.log(\"I'm ready ...\");\n    });\n\nThe usage of absolute paths is recommended.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrasimir%2Fless-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrasimir%2Fless-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrasimir%2Fless-compiler/lists"}