{"id":16485822,"url":"https://github.com/creeperyang/grunt-sprite","last_synced_at":"2026-06-08T01:01:38.621Z","repository":{"id":30552687,"uuid":"34107439","full_name":"creeperyang/grunt-sprite","owner":"creeperyang","description":"A grunt plugin to generate css sprite.","archived":false,"fork":false,"pushed_at":"2015-06-03T14:20:05.000Z","size":344,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-09T05:18:50.027Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creeperyang.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":"2015-04-17T09:13:00.000Z","updated_at":"2015-07-04T08:40:53.000Z","dependencies_parsed_at":"2022-09-04T13:10:24.345Z","dependency_job_id":null,"html_url":"https://github.com/creeperyang/grunt-sprite","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/creeperyang/grunt-sprite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Fgrunt-sprite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Fgrunt-sprite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Fgrunt-sprite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Fgrunt-sprite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creeperyang","download_url":"https://codeload.github.com/creeperyang/grunt-sprite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Fgrunt-sprite/sbom","scorecard":{"id":308394,"data":{"date":"2025-08-11","repo":{"name":"github.com/creeperyang/grunt-sprite","commit":"a4a7e6a42f6019958ec41941c5648c9080c2187d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T22:39:23.034Z","repository_id":30552687,"created_at":"2025-08-17T22:39:23.034Z","updated_at":"2025-08-17T22:39:23.034Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34043822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11T13:27:23.580Z","updated_at":"2026-06-08T01:01:38.597Z","avatar_url":"https://github.com/creeperyang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-image-sprite\n\n\u003e convert images to a css sprite image\n\n## Getting Started\nThis plugin requires Grunt.\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-image-sprite --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-image-sprite');\n```\n\n## More about instalation\n\nThe plugin depend on `imagemagick`. ImageMagick is a software suite to create, edit, compose, or convert bitmap images. You can goto \u003chttp://www.imagemagick.org/\u003e for details.\n\nIf your os is `Ubuntu|Mac os`, when you run `npm install grunt-image-sprite`, script will automatically install `imagemagick`.\n\nIf you use windows and other os, or the instalation failed, please install `imagemagick` manually. Goto \u003chttp://www.imagemagick.org/script/binary-releases.php\u003e for details.\n\n## The \"image_sprite\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `image_sprite` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  image_sprite: {\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.retina\nType: `Boolean|Function`\nDefault value: `false`\n\nA value that is used to enable/disable retina feature.\n\nIf setted to `true`, when iterating all images, the image whose path is like `name@2x.ext` or `dir@2x/name.ext` will be taked as the retina image.\n\nIf setted to a function, the image path will be passed to the function as argument and the function should return a boolean value. Then, if the returned value is `true`, the plugin will take the image as retina image.\n\n#### options.vertical\nType: `Boolean`\nDefault value: `true`\n\nA boolean value that is used to specify orientation of icons.\n\n#### options.margin\nType: `Number`\nDefault value: `0`\n\nA number value that is used to specify margin(icon's gap).\n\n#### options.prefix\nType: `String`\nDefault value: `'icon'`\n\nA string value that is used as class name's prefix when generate css file.\n\n```css\n.icon-angle-down-suffix {\n// 'icon' is the prefix, '-' is the connector, 'andle-down' is automatically generated from file's name, 'suffix' is the suffix.\n}\n```\n\n#### options.connector\nType: `String`\nDefault value: `'-'`\n\nA string value that is used as connector when generate css file.\n\n#### options.suffix\nType: `String`\nDefault value: `''`\n\nA string value that is used as class name's suffix when generate css file.\n\n#### options.cssPath\nType: `String`\nDefault value: `''`\n\nA string value that is used to specify css file's path\n\n#### options.cssFile\nType: `String|Function`\nDefault value: `''`\n\nA string/function value that is used to specify css file's name. If it is set to function, the generated sprite image's path will be passed as argument.\n\n### Usage Examples\n\n#### Default Options\nRun command `grunt image_sprite`, you will get the `tmp/sprite.png` and `tmp/sprite.css`.\n\n```js\ngrunt.initConfig({\n  image_sprite: {\n    options: {\n      'cssPath': 'tmp',\n      'vertical': true,\n      'margin': 2\n    },\n    sprite: {\n      options: {\n        'vertical': true,\n        'cssFile': 'sprite.css' // 'sprite.less' is also allowed\n      },\n      files: {\n        'tmp/sprite.png': ['test/fixtures/*.png']\n      }\n    }\n  },\n})\n```\n\n**How to use the generated sprite style inside your project?**\n\nIf you use `v0.0.1`, you need some more work: \n\n1. add css/less code bellow:\n    ```css\n    @import url('tmp/sprite.css');\n\n    .icon {\n      display: inline-block; // block;\n      background-image: url('tmp/sprite.png');\n      background-repeat: no-repeat;\n    }\n    ```\n2. make sure css/less file path and sprite image path are right. Include css file in your html.\n3. Finally you can write something like this:\n    \n    ```html\n    \u003ci class='icon icon-angle-down'\u003e\u003c/i\u003e\n    ```\n\n**Otherwise(from `v0.1.0`)**, you can just include the generated style file and write `\u003ci class='icon icon-angle-down'\u003e\u003c/i\u003e`.\n\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\n## Release History\n\n2015-06-02\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;`v0.1.1`\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;fix bug when images not found.\n\n2015-05-07\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;`v0.1.0`\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;support retina and enhance style file.\n\n2015-04-17\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;`v0.0.1`\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;init\n\n## License\nCopyright (c) 2015 creeperyang. Licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreeperyang%2Fgrunt-sprite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreeperyang%2Fgrunt-sprite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreeperyang%2Fgrunt-sprite/lists"}