{"id":13671906,"url":"https://github.com/targetkiller/gulp-imageisux","last_synced_at":"2025-04-27T18:32:00.623Z","repository":{"id":22640738,"uuid":"25983616","full_name":"targetkiller/gulp-imageisux","owner":"targetkiller","description":"智图gulp插件","archived":false,"fork":false,"pushed_at":"2015-06-22T11:44:22.000Z","size":2407,"stargazers_count":382,"open_issues_count":17,"forks_count":49,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-13T06:51:43.404Z","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/targetkiller.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":"2014-10-30T18:10:19.000Z","updated_at":"2025-03-17T11:32:16.000Z","dependencies_parsed_at":"2022-08-05T18:30:22.868Z","dependency_job_id":null,"html_url":"https://github.com/targetkiller/gulp-imageisux","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/targetkiller%2Fgulp-imageisux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetkiller%2Fgulp-imageisux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetkiller%2Fgulp-imageisux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetkiller%2Fgulp-imageisux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/targetkiller","download_url":"https://codeload.github.com/targetkiller/gulp-imageisux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251187361,"owners_count":21549625,"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-08-02T09:01:21.706Z","updated_at":"2025-04-27T18:31:55.610Z","avatar_url":"https://github.com/targetkiller.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"#gulp-imageisux\n\n[![NPM](https://nodei.co/npm/gulp-imageisux.png)](https://nodei.co/npm/gulp-imageisux/)\n\n[智图](http://zhitu.isux.us/)的gulp插件\n\n##Introduce\n这是智图的gulp插件，它能自动压缩图片，并生成对应的webp格式(可选)。\n你只需要声明`src(path)`图片源地址，并执行方法`pipe(imageisux())`就好了。\n\n##Install\n当然，你需要先安装[gulp](http://gulpjs.com/)。\n\n```js\n$ npm install --global gulp\n```\n\n然后安装插件。\n\n```js\n//全局安装\n$ npm install --global gulp-imageisux\n\n//局部安装\n$ npm install --save-dev gulp-imageisux\n```\n\n##Usage\n1、声明图片地址，例如放在img目录下面`gulp.src(['img/*'])`。\n2、指定参数，压缩图片导出目录`/dest/`和是否同时导出webp格式。\n\n```js\nvar imageisux = require('gulp-imageisux');\n\ngulp.task('imageisux', function() {\n\treturn gulp.src(['img/*'])\n\t\t\t   .pipe(imageisux('/dirpath/',true));\n});\n```\n\n##API\n两个参数，`dirpath`目标目录以及`enableWebp`是否同时导出对应WEBP格式图片。\n\n - `dirpath`: 如果未定义，会自动生成两个目录：'/dest/'目录放压缩后图片，'/webp/'目录放对应的webp格式压缩图片。\n\n - `enableWebp`  : 若为`true`，则会同时输出webp图片；若为`false`，则只会有压缩后原格式图片。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftargetkiller%2Fgulp-imageisux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftargetkiller%2Fgulp-imageisux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftargetkiller%2Fgulp-imageisux/lists"}