{"id":15882594,"url":"https://github.com/ph1p/rollup-plugin-template-postcss","last_synced_at":"2026-01-18T23:06:27.519Z","repository":{"id":251797938,"uuid":"838497011","full_name":"ph1p/rollup-plugin-template-postcss","owner":"ph1p","description":"Run Postcss on Template Literals. For example on LitElements.","archived":false,"fork":false,"pushed_at":"2024-08-06T09:37:20.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-28T20:45:10.921Z","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/ph1p.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":"2024-08-05T19:01:13.000Z","updated_at":"2024-08-06T09:37:23.000Z","dependencies_parsed_at":"2024-08-05T21:28:23.306Z","dependency_job_id":null,"html_url":"https://github.com/ph1p/rollup-plugin-template-postcss","commit_stats":null,"previous_names":["ph1p/rollup-plugin-template-postcss"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ph1p/rollup-plugin-template-postcss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Frollup-plugin-template-postcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Frollup-plugin-template-postcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Frollup-plugin-template-postcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Frollup-plugin-template-postcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ph1p","download_url":"https://codeload.github.com/ph1p/rollup-plugin-template-postcss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ph1p%2Frollup-plugin-template-postcss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28553069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T20:59:07.572Z","status":"ssl_error","status_checked_at":"2026-01-18T20:59:02.799Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-06T04:05:25.699Z","updated_at":"2026-01-18T23:06:27.505Z","avatar_url":"https://github.com/ph1p.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run Postcss on Template Literals\n\nThis plugin iterates through all CSS template literals in your JavaScript files and processes them using PostCSS.\nIt is perfect for LitElement's `css` template literal.\n\n## Installation\n\n```bash\nnpm install --save-dev rollup-plugin-template-postcss postcss\n```\n\n## Usage\n\n### Options\n\n| Option    | Type                | Default                  | Description                           |\n| --------- | ------------------- | ------------------------ | ------------------------------------- |\n| `plugins` | `Array`             | `[]`                     | PostCSS plugins to use.               |\n| `include` | `Array`             | `['**/*.js', '**/*.ts']` | Glob patterns to include.             |\n| `exclude` | `Array`             | `[]`                     | Glob patterns to exclude.             |\n| `tags`    | `Array` or `String` | `'css'`                  | CSS template literal tags to process. |\n\n### Example\n\n```js\nimport { templatePostcss } from 'rollup-plugin-template-postcss';\n\nexport default {\n  // ...\n  plugins: [\n    // ...\n    templatePostcss({\n      tags: ['css', 'myCustomCss'], // default is 'css' (optional)\n      include: ['**/*.js', '**/*.ts'], // default (optional)\n      exclude: [], // default (optional)\n      // PostCSS plugins\n      plugins: [],\n    }),\n  ],\n};\n```\n\n### With nano css and advanced preset\n\n```bash\nnpm install --save-dev cssnano cssnano-preset-advanced\n```\n\n```js\nimport { templatePostcss } from 'rollup-plugin-template-postcss';\nimport cssnano from 'cssnano';\n\nexport default {\n  // ...\n  plugins: [\n    // ...\n    templatePostcss({\n      plugins: [\n        cssnano({\n          preset: [\n            'advanced',\n            {\n              discardComments: {\n                removeAll: true,\n              },\n            },\n          ],\n        }),\n      ],\n    }),\n  ],\n};\n```\n\n### With vite\n\n```js\nimport { templatePostcss } from 'rollup-plugin-template-postcss';\n\nexport default {\n  //...\n  build: {\n    rollupOptions: {\n      plugins: [\n        //...\n        templatePostcss({\n          plugins: [],\n        }),\n      ],\n    },\n  },\n};\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fph1p%2Frollup-plugin-template-postcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fph1p%2Frollup-plugin-template-postcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fph1p%2Frollup-plugin-template-postcss/lists"}