{"id":18609684,"url":"https://github.com/unlight/babel-plugin-postcss","last_synced_at":"2025-06-28T17:33:07.605Z","repository":{"id":55419848,"uuid":"239580791","full_name":"unlight/babel-plugin-postcss","owner":"unlight","description":"Replace import from css expression to lit-element's css tag function","archived":false,"fork":false,"pushed_at":"2022-03-21T21:27:53.000Z","size":93,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:41:40.271Z","etag":null,"topics":["babel-plugin","babel-plugin-import","babel-plugin-postcss"],"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/unlight.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}},"created_at":"2020-02-10T18:17:45.000Z","updated_at":"2020-12-31T23:21:27.000Z","dependencies_parsed_at":"2022-08-15T00:00:23.593Z","dependency_job_id":null,"html_url":"https://github.com/unlight/babel-plugin-postcss","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fbabel-plugin-postcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fbabel-plugin-postcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fbabel-plugin-postcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fbabel-plugin-postcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unlight","download_url":"https://codeload.github.com/unlight/babel-plugin-postcss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111940,"owners_count":21049576,"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":["babel-plugin","babel-plugin-import","babel-plugin-postcss"],"created_at":"2024-11-07T03:06:57.563Z","updated_at":"2025-04-10T22:31:38.002Z","avatar_url":"https://github.com/unlight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-postcss\n\nReplace import from css by content transformed by postcss\n\n## Examples\n\nInput:\n\n```ts\nimport style1 from './style.css';\nimport style2 from './style.css'; // options: { tagged: ['css', 'lit-element'] }\n```\n\nOutput:\n\n```ts\nvar style1 = '/* style.css content */';\nimport { css } from 'lit-element';\nvar style2 = css`\n    /* style.css content */\n`;\n```\n\n## Install\n\n1. `npm install --save-dev babel-plugin-postcss`\n2. Add `['babel-plugin-postcss', { options }]` to plugins section of babel config.\n\n## Options\n\n#### test\n\nRegular expression or function which test importee for being parsed as style file (css).  \nType: `RegExp | Function`  \nDefault: `/\\.css$/`  \nExample: `/\\.css$/` only `.css` imports will be parsed\n\n#### postcss\n\nIf value is truthy css content will be processed by postcss,\npostcss config will be loaded by `postcss-load-config`.  \nType: `undefined | boolean`  \nDefault: `undefined`\n\n#### tagged\n\nWrap css content to tagged template, array of two elements. First is tagged function,\nsecond is module where import the tagged function from.  \nType: `undefined | [string, string]`  \nDefault: `undefined`  \nExample: `['css', 'lit-element']`\n\nInput:\n\n```ts\nimport style3 from './style3.css';\n```\n\nOutput:\n\n```ts\nimport { css } from 'lit-element';\nvar style2 = css`\n    /* style3.css content */\n`;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fbabel-plugin-postcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funlight%2Fbabel-plugin-postcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fbabel-plugin-postcss/lists"}