{"id":21842977,"url":"https://github.com/ullmark/grunt-ucss","last_synced_at":"2025-04-14T12:05:11.734Z","repository":{"id":6844224,"uuid":"8092796","full_name":"ullmark/grunt-ucss","owner":"ullmark","description":"run ucss with grunt","archived":false,"fork":false,"pushed_at":"2016-05-24T07:17:50.000Z","size":42,"stargazers_count":52,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T12:05:07.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ullmark.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2013-02-08T12:00:59.000Z","updated_at":"2021-07-09T21:51:31.000Z","dependencies_parsed_at":"2022-07-25T22:32:38.936Z","dependency_job_id":null,"html_url":"https://github.com/ullmark/grunt-ucss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullmark%2Fgrunt-ucss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullmark%2Fgrunt-ucss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullmark%2Fgrunt-ucss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullmark%2Fgrunt-ucss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ullmark","download_url":"https://codeload.github.com/ullmark/grunt-ucss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248877983,"owners_count":21176243,"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-11-27T22:13:54.341Z","updated_at":"2025-04-14T12:05:11.709Z","avatar_url":"https://github.com/ullmark.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-ucss\n\n\u003e Run [ucss](https://github.com/oyvindeh/ucss) with grunt.\n\n## Getting Started\n_If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide._\n\nFrom the same directory as your project's [Gruntfile][Getting Started] and [package.json][], install this plugin with the following command:\n\n```bash\nnpm install grunt-ucss --save-dev\n```\n\nOnce that's done, add this line to your project's Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-ucss');\n```\n\nIf the plugin has been installed correctly, running `grunt --help` at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a `devDependency`, which ensures that it will be installed whenever the `npm install` command is run.\n\n[grunt]: http://gruntjs.com/\n[Getting Started]: https://github.com/gruntjs/grunt/blob/devel/docs/getting_started.md\n[package.json]: https://npmjs.org/doc/json.html\n\n## The \"ucss\" task\nThe task can do two things; Analyze html+css using [ucss][] and print out any unused selectors\nin the grunt log and use that information to create new clean\n\n### Overview\nIn your project's Gruntfile, add a section named `ucss` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  ucss: {\n    target: {\n      options: {\n        whitelist: ['.some-ok-selector'],\n        auth: null\n      },\n      pages: {\n        crawl: 'http://localhost/crawlstart',\n        include: ['http://localhost/extra-not-reachable-by-crawl']\n      },\n      css: ['http://localhost/styles.css']\n    }\n  }\n})\n```\n\n### Options\n\n#### options.whitelist\nType: `Array` of `String`\nDefault value: `[]`\n\nAn array of selectors that should be 'white listed' meaning will not \nbe listed or cleaned away even though it isn't used.\n\n#### options.auth\nType: `Object`\nDefault value: `null`\n\nLet's you specify authentication to use. See [ucss auth documentation](https://github.com/oyvindeh/ucss#logging-in) for more details\n\n#### pages.crawl\nType: `String`\nDefault value: `[]`\n\nSpecify a html-file to start crawling\n\n#### pages.include\nType: `Array` of `String`\nDefault value: `[]`\n\nAny extra pages not included in the crawl.\n\n#### css \n\nSpecify what css files to analyze\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][].\n\n## TODO\nSo, I started up this task and then abandoned it for a while... I've released this initial version just \nto get a version ppl can start using. I will add more test-cases and so on later on, and if you\ngot an idea or feature to add just tell me :)\n\n## Release History\n  - 0.1.0 - A first alpha version that prints unused selectors and their location in the css-files\n  - 0.1.2 - Updated the README to remove text about *cleaned version*\n\n\n[ucss]: https://github.com/oyvindeh/ucss\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullmark%2Fgrunt-ucss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fullmark%2Fgrunt-ucss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullmark%2Fgrunt-ucss/lists"}