{"id":16676651,"url":"https://github.com/princed/grunt-csswring","last_synced_at":"2025-04-09T20:40:31.996Z","repository":{"id":15697334,"uuid":"18435135","full_name":"princed/grunt-csswring","owner":"princed","description":"DEPRECATED. Minify CSS files using PostCSS-based CSSWring","archived":false,"fork":false,"pushed_at":"2015-03-01T20:55:11.000Z","size":257,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T04:09:13.673Z","etag":null,"topics":["css-minifier","csswring","deprecated","grunt","grunt-plugins","postcss"],"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/princed.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":"2014-04-04T10:07:44.000Z","updated_at":"2019-08-13T15:39:07.000Z","dependencies_parsed_at":"2022-08-25T11:50:13.917Z","dependency_job_id":null,"html_url":"https://github.com/princed/grunt-csswring","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/princed%2Fgrunt-csswring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princed%2Fgrunt-csswring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princed%2Fgrunt-csswring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princed%2Fgrunt-csswring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/princed","download_url":"https://codeload.github.com/princed/grunt-csswring/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248109613,"owners_count":21049343,"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":["css-minifier","csswring","deprecated","grunt","grunt-plugins","postcss"],"created_at":"2024-10-12T13:11:09.661Z","updated_at":"2025-04-09T20:40:31.976Z","avatar_url":"https://github.com/princed.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-csswring\n\n\u003e Source Maps aware CSS minification task. Based on [CSSWring](https://github.com/hail2u/node-csswring) based on [PostCSS](https://github.com/ai/postcss).\n\n[![Dependency Status](https://gemnasium.com/princed/grunt-csswring.svg)](https://gemnasium.com/princed/grunt-csswring)\n\n## DEPRECATED\n\nInstead there is:\n* task shipped with [CSSWring](https://github.com/hail2u/node-csswring#grunt-plugin-usage) itself\n* [grunt-postcss](https://github.com/nDmitry/grunt-postcss) to apply multiple transformation to css in one pass.\n\n## Getting Started\nThis plugin requires Grunt `~0.4.0`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-csswring --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-csswring');\n```\n\n## The “csswring” task\n\n### Overview\nIn your project's Gruntfile, add a section named `csswring` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  csswring: {\n    options: {\n      // Task-specific options go here.\n    },\n    your_target: {\n      // Target-specific file lists and/or options go here.\n    },\n  },\n})\n```\n\n### Options\n\n#### options.banner\nType: `String|undefined`\nDefault value: `undefined`\n\nAllows to add comment to the beginning of minified files.\n\n#### options.map\nType: `Boolean|String|undefined`\nDefault value: `undefined`\n\nIf the map option isn't defined, PostCSS will look for source map from a previous compilation step (either inline map or separate one) and update it automatically. Let's say you have `path/file.css` and `path/file.css.map` from SASS, PostCSS will find that map, update it and save to a specified destination.\n\nIf `true` is specified, PostCSS will try to find an input source map file as described above and generate a new map based on the found one (or just generate a new map, unlike the situation when the map option is undefined).\n\nIf you keep your map from a pre-processor in another directory (e.g. `path/file.css` and `another-path/file.css.map`), you can specify the path `another-path/` in the map option to point out where grunt-csswring should look for an input map to update it.\n\nAlso you can specify `false`. In that case PostCSS will not generate or update source map even if there is one from a previous compilation step near an input file or inlined to it (PostCSS will delete a map annotation comment from an input file).\n\nYou cannot specify a path where to save a map file, it will be saved at the same directory as the output CSS file or inlined to it (check out the option below).\n\n#### options.mapInline\nType: `Boolean|undefined`\nDefault value: `undefined`\n\nIf the option isn't specified, PostCSS will inline its map if a map from a previous compilation step was inlined to an input file or save its map as a separate file respectively.\n\nYou can specify `true` or `false` to force that behaviour as you like.\n\n#### options.preserveHacks\nType: `Boolean|undefined`\nDefault value: `undefined`\n\nAllows to preserve properties hacks like `*display: inline;`\n\n#### options.removeAllComments\nType: `Boolean|undefined`\nDefault value: `undefined`\n\nBy default, CSSWring keeps a comment that start with `/*!`. If you want to remove all comments, set option to `true`.\n\n#### options.report\nChoices: `min`, `gzip`\nDefault value: `min`\nEither report only minification result or report minification and gzip results. Using `gzip` will make the task take 5-10x longer to complete.\n\n\n### Usage Examples\n\n```js\ngrunt.initConfig({\n\n  csswring: {\n\n    options: {\n      // Task-specific options go here.\n    },\n\n    // minify the specified file\n    single_file: {\n      options: {\n        // Target-specific options go here.\n      },\n      src: 'src/css/file.css',\n      dest: 'dest/css/file.css'\n    },\n\n    // minify all files\n    multiple_files: {\n      expand: true,\n      flatten: true,\n      src: 'src/css/*.css', // -\u003e src/css/file1.css, src/css/file2.css\n      dest: 'dest/css/' // -\u003e dest/css/file1.css, dest/css/file2.css\n    },\n\n    // if you have specified only the `src` param, the destination will be set automatically,\n    // so source files will be overwritten\n    no_dest: {\n      src: 'dest/css/file.css' // globbing is also possible here\n    },\n\n    sourcemap: {\n        options: {\n            map: true\n        },\n        src: 'src/css/file.css',\n        dest: 'dest/css/file.css' // -\u003e dest/css/file.css, dest/css/file.css.map\n    },\n  }\n});\n```\n\n## Acknowledgements\nThis task is mostly based on [grunt-autoprefixer](https://github.com/nDmitry/grunt-autoprefixer) by Dmitry Nikitenko.\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](http://gruntjs.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprinced%2Fgrunt-csswring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprinced%2Fgrunt-csswring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprinced%2Fgrunt-csswring/lists"}