{"id":18062809,"url":"https://github.com/ded/sqwish","last_synced_at":"2025-04-11T15:05:10.579Z","repository":{"id":54440783,"uuid":"1654320","full_name":"ded/sqwish","owner":"ded","description":"a node-based CSS compressor","archived":false,"fork":false,"pushed_at":"2015-07-01T03:19:13.000Z","size":246,"stargazers_count":200,"open_issues_count":12,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-13T22:45:04.387Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ded.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2011-04-23T18:12:17.000Z","updated_at":"2024-03-26T17:50:37.000Z","dependencies_parsed_at":"2022-08-13T15:50:09.867Z","dependency_job_id":null,"html_url":"https://github.com/ded/sqwish","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2Fsqwish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2Fsqwish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2Fsqwish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2Fsqwish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ded","download_url":"https://codeload.github.com/ded/sqwish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429062,"owners_count":21101780,"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-10-31T05:08:29.893Z","updated_at":"2025-04-11T15:05:10.554Z","avatar_url":"https://github.com/ded.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Welcome to Sqwish\n=================\n\nA [Node](http://nodejs.org) based CSS Compressor. It works like this.\n\n``` javascript\nrequire('sqwish').minify('body { color: #ff33cc; }');\n// =\u003e \"body{color:#f3c}\"\n```\n\nCLI\n---\n\nInstall it.\n\n    $ npm install -g sqwish\n\nUse it like this:\n\n    $ sqwish app.css # default output is \u003cfile\u003e.min.css therefore app.css =\u003e app.min.css\n    $ # or...\n    $ sqwish css/styles.css -o prod/something-else.min.css\n\nNotes\n-----\n\nSqwish does not attempt to fix invalid CSS, therefore, at minimum, your CSS should at least follow the basic rules:\n\n``` css\nselectors[,more selectors] {\n  property: value;\n  another-property: another value;\n}\n```\n\nStrict Optimizations\n--------------------\n\nAside from regular minification, in \u003ccode\u003e--strict\u003c/code\u003e mode Sqwish will combine duplicate selectors and merge duplicate properties.\n\n``` css\n/* before */\ndiv {\n  color: orange;\n  background: red;\n}\ndiv {\n  color: #ff33cc;\n  margin: 1px 0px 1px 0px;\n}\n\n/* after */\ndiv{color:#f3c;background:red;margin:1px 0}\n```\n\nThis mode can be enabled as so:\n\n    sqwish.minify(css, true);\n\non the command line\n\n    $ sqwish styles.css --strict\n\nDevelopers\n----------\n\nBe sure you have the proper testing harness set up ahead of time by installing the \u003ccode\u003esink-test\u003c/code\u003e submodule\n\n    $ npm install --dev\n\nTests can be added in \u003ccode\u003etests/tests.js\u003c/code\u003e, and then run as such:\n\n    $ npm test\n\nLicense\n-------\n\nSqwish is copyright Dustin Diaz 2011 under MIT License\n\n**Happy Sqwishing!**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fded%2Fsqwish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fded%2Fsqwish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fded%2Fsqwish/lists"}