{"id":15041758,"url":"https://github.com/binbiubiubiu/taro-plugin-style-resource","last_synced_at":"2025-04-14T20:23:31.886Z","repository":{"id":42473114,"uuid":"477309681","full_name":"Binbiubiubiu/taro-plugin-style-resource","owner":"Binbiubiubiu","description":"Taro 构建编译插件,给less或stylus添加公共样式资源","archived":false,"fork":false,"pushed_at":"2023-07-24T14:43:39.000Z","size":1077,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-06T04:07:42.267Z","etag":null,"topics":["less","plugin","scss","stylus","taro","taro-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Binbiubiubiu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-04-03T10:39:27.000Z","updated_at":"2023-11-13T02:40:02.000Z","dependencies_parsed_at":"2024-09-20T18:23:04.963Z","dependency_job_id":"f9961a6a-af57-4307-b517-f54d6297f0fa","html_url":"https://github.com/Binbiubiubiu/taro-plugin-style-resource","commit_stats":{"total_commits":39,"total_committers":2,"mean_commits":19.5,"dds":"0.41025641025641024","last_synced_commit":"cd13189f79f61a335087fe6fdeca3d5ec6269c4d"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binbiubiubiu%2Ftaro-plugin-style-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binbiubiubiu%2Ftaro-plugin-style-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binbiubiubiu%2Ftaro-plugin-style-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binbiubiubiu%2Ftaro-plugin-style-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Binbiubiubiu","download_url":"https://codeload.github.com/Binbiubiubiu/taro-plugin-style-resource/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248953172,"owners_count":21188594,"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","scss","stylus","taro","taro-plugin"],"created_at":"2024-09-24T20:46:26.886Z","updated_at":"2025-04-14T20:23:31.862Z","avatar_url":"https://github.com/Binbiubiubiu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# taro-plugin-style-resource\n\nTaro 构建编译插件,给`less`或`stylus`添加公共样式资源\n\n## 使用\n\n### 安装\n\n```\nnpm i taro-plugin-style-resource\n\n# yarn\nyarn add taro-plugin-style-resource\n```\n\n### 使用插件\n\n`/config/index.js`\n\n```js\nconst path = require(\"path\");\n// 示例, 如果你使用 `vs code` 作为开发工具， 你还可以使用注释的语法引入插件包含的声明文件，可获得类似于typescript的友好提示\n/**\n * @typedef { import(\"taro-plugin-style-resource\").PluginOptions } PluginOptions\n * @type {PluginOptions}\n */\nconst pluginOptions = {\n  less: {\n    patterns: [path.resolve(__dirname, \"..\", \"src/styles/index.less\")],\n  },\n};\nconst config = {\n  plugins: [[\"taro-plugin-style-resource\", pluginOptions]],\n};\n```\n\n## API\n\n### 插件配置\n\n| 参数   | 类型   | 说明                                                                                              |\n| :----- | :----- | :------------------------------------------------------------------------------------------------ |\n| less   | Object | [style-resources-loader](https://www.npmjs.com/package/style-resources-loader)的配置 |\n| stylus | Object | [style-resources-loader](https://www.npmjs.com/package/style-resources-loader)的配置 |\n\n### 支持平台\n\n| 平台名称          | 是否支持 |\n| :---------------- | :------- |\n| H5                | ✅       |\n| 微信小程序        | ✅       |\n| 京东小程序        | ✅       |\n| 百度小程序        | ✅       |\n| 支付宝小程序      | ✅       |\n| 字节跳动小程序    | ✅       |\n| QQ 小程序         | ✅       |\n| 钉钉小程序        | ✅       |\n| 企业微信小程序    | ✅       |\n| 支付宝 IOT 小程序 | ✅       |\n| 飞书小程序        | ✅       |\n| 快手小程序        | ✅       |\n| 小红书小程序      | ✅       |\n| ReactNative       | ❌       |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinbiubiubiu%2Ftaro-plugin-style-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinbiubiubiu%2Ftaro-plugin-style-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinbiubiubiu%2Ftaro-plugin-style-resource/lists"}