You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
4.7 KiB

  1. {
  2. "name": "grunt-css",
  3. "description": "Grunt plugin for linting and minifying CSS",
  4. "version": "0.5.4",
  5. "homepage": "https://github.com/jzaefferer/grunt-css",
  6. "author": {
  7. "name": "Jörn Zaefferer",
  8. "email": "joern.zaefferer@gmail.com"
  9. },
  10. "repository": {
  11. "type": "git",
  12. "url": "git://github.com/jzaefferer/grunt-css.git"
  13. },
  14. "bugs": {
  15. "url": "https://github.com/jzaefferer/grunt-css/issues"
  16. },
  17. "licenses": [
  18. {
  19. "type": "MIT",
  20. "url": "https://github.com/jzaefferer/grunt-css/blob/master/LICENSE-MIT"
  21. }
  22. ],
  23. "main": "tasks/grunt-css",
  24. "engines": {
  25. "node": ">=0.6.0"
  26. },
  27. "dependencies": {
  28. "clean-css": "0.9.1",
  29. "csslint": "0.9.10",
  30. "gzip-js": "0.3.1"
  31. },
  32. "devDependencies": {
  33. "grunt": "0.4.x",
  34. "grunt-contrib-jshint": "0.1.0"
  35. },
  36. "keywords": [
  37. "gruntplugin"
  38. ],
  39. "readme": "# grunt-css\n\n[Grunt](https://github.com/cowboy/grunt) plugin for linting and minifying CSS\n\n## Getting Started\n\nInstall the module with:\n\n\tnpm install grunt-css --save-dev\n\nThen load it from your own `Gruntfile.js` file:\n\n```js\ngrunt.loadNpmTasks('grunt-css');\n```\n\n### grunt 0.3 compability\n\nIf you're using grunt 0.3, install the 0.1.0 version of this task:\n\n\tnpm install grunt-css@0.3.2\n\n## Documentation\n\nThis plugin provides two tasks: `cssmin` and `csslint`. Both area [multi tasks][types_of_tasks], meaning that grunt will automatically iterate over all `cssmin` and `csslint` targets if a target is not specified.\n\n[types_of_tasks]: https://github.com/cowboy/grunt/blob/master/docs/types_of_tasks.md\n\n### cssmin\n\nThis works similar to the [`uglify` task](https://github.com/gruntjs/grunt-contrib-uglify). Specify a src and dest property for input and output:\n\n```js\n// Project configuration.\ngrunt.initConfig({\n\tcssmin: {\n\t\tmy_target: {\n\t\t\tsrc: 'src/input.css',\n\t\t\tdest: 'dist/output.min.css'\n\t\t}\n\t}\n});\n```\n\nExposes option of clean-css, which you can set per target or for all, as usual:\nkeepSpecialComments\n\n```js\n// Project configuration.\ngrunt.initConfig({\n\tcssmin: {\n\t\toptions: {\n\t\t\tkeepSpecialComments: 0\n\t\t},\n\t\tmy_target: {\n\t\t\toptions: {\n\t\t\t\tkeepSpecialComments: 1\n\t\t\t},\n\t\t\tsrc: 'src/input.css',\n\t\t\tdest: 'dist/output.min.css'\n\t\t}\n\t}\n});\n```\n\n#### Banner comments\n\nIn this example, running `grunt cssmin:my_target` will prepend a banner created by interpolating the `banner` template string with the config object. Here, those properties are the values imported from the `package.json` file (which are available via the `pkg` config property) plus today's date.\n\n\n```js\n// Project configuration.\ngrunt.initConfig({\n\tpkg: grunt.file.readJSON('package.json'),\n\tcssmin: {\n\t\toptions: {\n\t\t\tbanner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +\n\t\t\t\t'<%= grunt.template.today(\"yyyy-mm-dd\") %> */'\n\t\t},\n\t\tmy_target: {\n\t\t\tfiles: {\n\t\t\t\tsrc: 'src/input.css',\n\t\t\t\tdest: 'dist/output.min.css'\n\t\t\t}\n\t\t}\n\t}\n});\n```\n\n\n### csslint\n\nThis is similar to the built-in lint task, though the configuration is different. Here's an example:\n\n```js\ncsslint: {\n\tbase_theme: {\n\t\tsrc: \"themes/base/*.css\",\n\t\trules: {\n\t\t\t\"import\": false,\n\t\t\t\"overqualified-elements\": 2\n\t\t}\n\t}\n}\n```\n\n`src` specifies the files to lint, `rules` the rules to apply. A value of `false` ignores the rule, a value of `2` will set it to become an error. Otherwise all rules are considered warnings.\n\nFor the current csslint version, these rules are available:\n\n\timportant\n\tadjoining-classes\n\tknown-properties\n\tbox-sizing\n\tbox-model\n\toverqualified-elements\n\tdisplay-property-grouping\n\tbulletproof-font-face\n\tcompatible-vendor-prefixes\n\tregex-selectors\n\terrors\n\tduplicate-background-images\n\tduplicate-properties\n\tempty-rules\n\tselector-max-approaching\n\tgradients\n\tfallback-colors\n\tfont-sizes\n\tfont-faces\n\tfloats\n\tstar-property-hack\n\toutline-none\n\timport\n\tids\n\tunderscore-property-hack\n\trules-count\n\tqualified-headings\n\tselector-max\n\tshorthand\n\ttext-indent\n\tunique-headings\n\tuniversal-selector\n\tunqualified-attributes\n\tvendor-prefix\n\tzero-units\n\nFor an explanation of those rules, [check the csslint wiki](https://github.com/stubbornella/csslint/wiki/Rules).\n\n*Side note: To update this list, run this:*\n\n```bash\nnode -e \"require('csslint').CSSLint.getRules().forEach(function(x) { console.log(x.id) })\"\n```\n\n## Contributing\n\nPlease use the issue tracker and pull requests.\n\n## License\nCopyright (c) 2012 Jörn Zaefferer\nLicensed under the MIT license.\n",
  40. "readmeFilename": "README.md",
  41. "_id": "grunt-css@0.5.4",
  42. "_from": "grunt-css@~0.5.4"
  43. }