{"id":15936106,"url":"https://github.com/zoubin/browserify-postcss","last_synced_at":"2025-09-05T10:33:02.990Z","repository":{"id":57162362,"uuid":"37587203","full_name":"zoubin/browserify-postcss","owner":"zoubin","description":"transform contents using postcss","archived":false,"fork":false,"pushed_at":"2018-02-11T10:20:36.000Z","size":136,"stargazers_count":20,"open_issues_count":3,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T02:46:30.702Z","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/zoubin.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2015-06-17T09:58:00.000Z","updated_at":"2025-01-15T15:11:55.000Z","dependencies_parsed_at":"2022-09-10T04:13:48.159Z","dependency_job_id":null,"html_url":"https://github.com/zoubin/browserify-postcss","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/zoubin/browserify-postcss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fbrowserify-postcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fbrowserify-postcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fbrowserify-postcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fbrowserify-postcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoubin","download_url":"https://codeload.github.com/zoubin/browserify-postcss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fbrowserify-postcss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273746630,"owners_count":25160646,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-07T04:04:02.568Z","updated_at":"2025-09-05T10:32:57.969Z","avatar_url":"https://github.com/zoubin.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# browserify-postcss\n[![version](https://img.shields.io/npm/v/browserify-postcss.svg)](https://www.npmjs.org/package/browserify-postcss)\n[![status](https://travis-ci.org/zoubin/browserify-postcss.svg)](https://travis-ci.org/zoubin/browserify-postcss)\n[![dependencies](https://david-dm.org/zoubin/browserify-postcss.svg)](https://david-dm.org/zoubin/browserify-postcss)\n[![devDependencies](https://david-dm.org/zoubin/browserify-postcss/dev-status.svg)](https://david-dm.org/zoubin/browserify-postcss#info=devDependencies)\n\nA [browserify] transform to work with [postcss].\n\n## Example\n\nThe build script:\n\n```javascript\nvar browserify = require('browserify')\nvar fs = require('fs')\n\nvar b = browserify(__dirname + '/src/entry.js')\nb.transform('browserify-postcss', {\n  // a list of postcss plugins\n  plugin: [\n    'postcss-import',\n    'postcss-advanced-variables',\n    ['postcss-custom-url', [\n      ['inline', { maxSize: 10 }],\n      ['copy', {\n        assetOutFolder: __dirname + '/static/assets',\n        baseUrl: 'assets',\n        name: '[name].[hash]',\n      }],\n    ]],\n  ],\n  // basedir where to search plugins\n  basedir: __dirname + '/src',\n  // insert a style element to apply the styles\n  inject: true,\n})\nb.bundle().pipe(\n  fs.createWriteStream(to)\n)\n\n```\n\nentry.js:\n\n```js\nrequire('./entry.css')\n\nconsole.log('styles from entry.css are applied')\n\n```\n\n## Options\n\n### plugin\nSpecify a list of [postcss] plugins to apply.\n\nType: `String`, `Array`\nDefault: `null`\n\n### basedir\nSpecify where to look for plugins.\n\n### postCssOptions\nSpecify the [options](https://github.com/postcss/postcss/blob/master/docs/api.md#processorprocesscss-opts)\nfor the [postcss] processor.\n\nThe `from` and `to` fields will be set to the css file path by default.\n\nThe `to` option is used to calculated `url()` in the final styles.\nHowever, if your [postcss] plugin does not need it,\ndon't bother to specify.\n\n### inject\nSpecify how to use the styles:\n\nIf `true`, styles are applied immediately.\nIf `false`, `require('style.css')` will return the string representation of the styles.\n\n### extensions\nA list of file extensions to identify styles.\n\nType: `Array`\n\nDefault: `['.css', '.scss', '.sass']`\n\n## Watch\nImported files will **NOT** be watched when used with [watchify].\n\n## Related\n\n* [reduce-css]: bundle css files without `require`ing them in js.\n\n\n[browserify]: https://github.com/substack/node-browserify\n[watchify]: https://github.com/substack/watchify\n[postcss]: https://github.com/postcss/postcss\n[reduce-css]: https://github.com/reducejs/reduce-css\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fbrowserify-postcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoubin%2Fbrowserify-postcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fbrowserify-postcss/lists"}