{"id":20504308,"url":"https://github.com/stencil-community/stencil-less","last_synced_at":"2025-10-30T06:38:08.673Z","repository":{"id":57162884,"uuid":"123038148","full_name":"stencil-community/stencil-less","owner":"stencil-community","description":"Less plugin for Stencil","archived":false,"fork":false,"pushed_at":"2024-04-26T12:53:48.000Z","size":70,"stargazers_count":6,"open_issues_count":2,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-27T11:11:55.671Z","etag":null,"topics":["less","plugin","stenciljs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@stencil-community/less","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stencil-community.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-26T22:17:18.000Z","updated_at":"2024-04-26T15:12:55.000Z","dependencies_parsed_at":"2024-04-25T15:27:16.458Z","dependency_job_id":"42510ee1-6982-4e66-acac-b89c23755e6e","html_url":"https://github.com/stencil-community/stencil-less","commit_stats":null,"previous_names":["ionic-team/stencil-less"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencil-community%2Fstencil-less","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencil-community%2Fstencil-less/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencil-community%2Fstencil-less/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencil-community%2Fstencil-less/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stencil-community","download_url":"https://codeload.github.com/stencil-community/stencil-less/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248388739,"owners_count":21095448,"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":["less","plugin","stenciljs"],"created_at":"2024-11-15T19:37:17.762Z","updated_at":"2025-10-30T06:38:03.638Z","avatar_url":"https://github.com/stencil-community.png","language":"TypeScript","funding_links":[],"categories":[":wrench: Stencil Tools"],"sub_categories":["Stencil Styling"],"readme":"# @stencil-community/less\n\nThis package is used to easily precompile Less files within the Stencil components.\n\nFirst, npm install within the project:\n\n```bash\nnpm install @stencil-community/less --save-dev\n```\n\nNext, within the project's `stencil.config.js` file, import the plugin and add it to the config's `plugins` config:\n\n#### stencil.config.ts\n```ts\nimport { Config } from '@stencil/core';\nimport { less } from '@stencil-community/less';\n\nexport const config: Config = {\n  plugins: [\n    less()\n  ]\n};\n```\n\nDuring development, this plugin will kick-in for `.less` style urls, and precompile them to CSS.\n\n## Options\n\n### Plugins\n\nThe `plugins` config is an array of Less plugins.\n\n```js\nconst LessPluginAutoPrefix = require('less-plugin-autoprefix');\n\nexports.config = {\n  plugins: [\n    less({\n      plugins: [\n        new LessPluginAutoPrefix({\n          browsers: ['last 2 versions']\n        })\n      ]\n    })\n  ]\n};\n```\n\n### Inject Globals Less Paths\n\nThe `injectGlobalPaths` config is an array of paths that automatically get added as `@import` declarations to all components. This can be useful to inject Less variables, mixins and functions to override defaults of external collections. Relative paths within `injectGlobalPaths` should be relative to the `stencil.config.js` file.\n\n```js\nexports.config = {\n  plugins: [\n    less({\n      injectGlobalPaths: [\n        'src/globals/variables.less',\n        'src/globals/mixins.less'\n      ]\n    })\n  ]\n};\n```\n\nNote that each of these files are always added to each component, so in most cases they shouldn't contain CSS because it'll get duplicated in each component. Instead, `injectGlobalPaths` should only be used for Less variables, mixins and functions, but not contain any CSS.\n\n## Related\n\n* [Less](https://www.npmjs.com/package/less)\n* [LessPluginAutoPrefix](https://www.npmjs.com/package/less-plugin-autoprefix)\n* [Stencil](https://stenciljs.com/)\n* [Stencil Worldwide Slack](https://stencil-worldwide.slack.com)\n* [Ionic Components](https://www.npmjs.com/package/@ionic/core)\n* [Ionicons](http://ionicons.com/)\n\n## Contributing\n\nPlease see our [Contributor Code of Conduct](https://github.com/ionic-team/ionic/blob/master/CODE_OF_CONDUCT.md) for information on our rules of conduct.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstencil-community%2Fstencil-less","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstencil-community%2Fstencil-less","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstencil-community%2Fstencil-less/lists"}