{"id":14968119,"url":"https://github.com/postcss/postcss-devtools","last_synced_at":"2025-07-17T00:05:43.922Z","repository":{"id":57327948,"uuid":"50600929","full_name":"postcss/postcss-devtools","owner":"postcss","description":"Log execution time for each plugin in a PostCSS instance.","archived":false,"fork":false,"pushed_at":"2017-01-18T23:10:27.000Z","size":24,"stargazers_count":92,"open_issues_count":3,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-09T09:24:17.528Z","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/postcss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-28T17:40:07.000Z","updated_at":"2023-11-29T11:51:53.000Z","dependencies_parsed_at":"2022-09-18T17:50:09.658Z","dependency_job_id":null,"html_url":"https://github.com/postcss/postcss-devtools","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/postcss/postcss-devtools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-devtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-devtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-devtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-devtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postcss","download_url":"https://codeload.github.com/postcss/postcss-devtools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-devtools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265198410,"owners_count":23726470,"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":[],"created_at":"2024-09-24T13:39:19.839Z","updated_at":"2025-07-17T00:05:43.885Z","avatar_url":"https://github.com/postcss.png","language":"JavaScript","readme":"# [postcss][postcss]-devtools [![Build Status](https://travis-ci.org/postcss/postcss-devtools.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-devtools.svg)][npm]\n\n\u003e Log execution time for each plugin in a PostCSS instance.\n\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-devtools) do:\n\n```\nnpm install postcss-devtools --save-dev\n```\n\n\n## Example\n\nLoad postcss-devtools into a PostCSS instance and it will wrap each plugin\nwith a function that logs the time taken for the plugin to perform its\nrequired task. Note that this plugin must be used with the asynchronous API:\n\n```js\nvar postcss = require('postcss');\nvar devtools = require('postcss-devtools');\nvar autoprefixer = require('autoprefixer');\n\nvar css = 'h1 { color: red }';\n\npostcss([devtools(), autoprefixer()]).process(css).then(function (result) {\n    console.log('Done.');\n});\n\n//=\u003e autoprefixer  37 ms\n//=\u003e Done.\n```\n\n\n## API\n\n### devtools([options])\n\n#### options\n\n##### precise\n\nType: `boolean`  \nDefault: `false`\n\nThis adds extra precision to the times that are reported.\n\n##### silent\n\nType: `boolean`  \nDefault: `false`\n\nSet this to `true` to use your own logger for the output of this module.\n\n### devtools.printSummary()\n\nPrint a summary spanning across all files. Note that you should set\n`opts.silent` to `true` to avoid outputting more than is necessary when calling\nthis function.\n\n```js\nvar postcss = require('postcss');\nvar devtools = require('postcss-devtools')({silent: true}); // disable summary for each css file\nvar autoprefixer = require('autoprefixer');\n\nvar cssOne = 'h1 { color: red }';\nvar cssTwo = 'h1 { color: blue }';\n// View a summary for all plugins across all css files\nPromise.all(\n  [\n    postcss([devtools, autoprefixer()]).process(cssOne),\n    postcss([devtools, autoprefixer()]).process(cssTwo)\n  ]\n).then(() =\u003e {\n  console.log('Done.');\n  devtools.printSummary();\n});\n//=\u003e Done.\n//=\u003e Summary\n//=\u003e autoprefixer  73 ms\n```\n\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n\n## Contributing\n\nPull requests are welcome. If you add functionality, then please add unit tests\nto cover it.\n\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n\n\n[ci]:      https://travis-ci.org/postcss/postcss-devtools\n[npm]:     http://badge.fury.io/js/postcss-devtools\n[postcss]: https://github.com/postcss/postcss\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-devtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostcss%2Fpostcss-devtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-devtools/lists"}