{"id":19218619,"url":"https://github.com/shepherdwind/grunt-joycss","last_synced_at":"2025-05-13T00:21:31.061Z","repository":{"id":8674564,"uuid":"10332475","full_name":"shepherdwind/grunt-joycss","owner":"shepherdwind","description":"grunt plugin for joycss","archived":false,"fork":false,"pushed_at":"2016-02-21T02:27:19.000Z","size":254,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T23:37:38.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/shepherdwind.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-05-28T09:45:32.000Z","updated_at":"2015-11-11T03:40:44.000Z","dependencies_parsed_at":"2022-09-01T00:51:02.027Z","dependency_job_id":null,"html_url":"https://github.com/shepherdwind/grunt-joycss","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/shepherdwind%2Fgrunt-joycss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shepherdwind%2Fgrunt-joycss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shepherdwind%2Fgrunt-joycss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shepherdwind%2Fgrunt-joycss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shepherdwind","download_url":"https://codeload.github.com/shepherdwind/grunt-joycss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843976,"owners_count":21972987,"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-09T14:27:28.248Z","updated_at":"2025-05-13T00:21:31.035Z","avatar_url":"https://github.com/shepherdwind.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-joycss\n\n\u003e grunt plugin for joycss(joycss.org)\n\n## Getting Started\nThis plugin requires Grunt `~0.4.1`\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-joycss --save-dev\n```\n\nOne the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.initConfig({\n  joycss: {\n    index: {\n      //紧凑拼图\n      options: { layout: 'close', force8bit: false },\n      cwd: 'test/less/',\n      src: ['index.less'],\n      dest: 'test/build/index'\n    },\n\n    detail: {\n      //水平布局\n      options: { layout: 'horizontal' },\n      cwd: 'test/less/',\n      src: ['detials.less'],\n      dest: 'test/build/detail/'\n    }\n  }\n});\ngrunt.loadNpmTasks('grunt-joycss');\n```\n## The \"joycss\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `joycss` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  joycss: {\n    options: {\n      // 强制支持png8模式，在需要支持ie6的情况下使用，默认为true\n      force8bit: true,\n      // 拼图方式，有四种方式，默认为自动布局，close是紧凑拼图\n      layout: 'auto' // auto | close | vertical | horizontal\n    },\n    your_target: {\n      // Target-specific file lists and/or options go here.\n    },\n  },\n})\n```\n\n### Options\n\n#### options.alpha\nType: `Boolean`\nDefault value: `false`\n\nIf alpha is true, the sprited image file type will be png24 with alpha\ntransparent. By default, sprited image file is png8, which is more smaller and\nsupport ie6.\n\n#### options.layout\nType: `String`\nDefault value: `auto`\n\nThere is four supported value: auto | close | vertical | horizontal. You can get\nmore help by run `joycss --help`.\n\n#### options.nochange\nType: `Boolean`\nDefault value: `false`\n\nThe same as `joycss --nochange`, when you don't need recreate the sprite image,\nonly change the result css file. Also, run `grunt joycss --nonchange` temporary\nis ok.\n\n#### options.upload\nType: `Boolean`\nDefault value: `false`\n\nThe same as `joycss --upload`, when you need upload sprite image to cdn, this\nonly work for Taobao F2Eer.\n\nAlso, `grunt joycss --upload` is ok. Before uplaod image, you need config you\nuser name, run `joycss --config` or `grunt joycss --config`.\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_(Nothing yet)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshepherdwind%2Fgrunt-joycss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshepherdwind%2Fgrunt-joycss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshepherdwind%2Fgrunt-joycss/lists"}