{"id":18389557,"url":"https://github.com/anseki/gulp-htmlclean","last_synced_at":"2025-04-07T02:34:29.173Z","repository":{"id":20807502,"uuid":"24092977","full_name":"anseki/gulp-htmlclean","owner":"anseki","description":"Simple and safety HTML/SVG cleaner to minify without changing its structure.","archived":false,"fork":false,"pushed_at":"2024-06-17T01:59:21.000Z","size":129,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T12:06:09.609Z","etag":null,"topics":["clean","comment","compress","gulp","gulpplugin","html","javascript","lightweight","linebreak","minify","svg","unneeded-whitespaces","whitespace"],"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/anseki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-16T09:13:34.000Z","updated_at":"2025-01-06T15:09:35.000Z","dependencies_parsed_at":"2024-06-18T18:17:59.655Z","dependency_job_id":"267a141d-6941-4a37-88f7-8f6bdc0a86c7","html_url":"https://github.com/anseki/gulp-htmlclean","commit_stats":{"total_commits":67,"total_committers":1,"mean_commits":67.0,"dds":0.0,"last_synced_commit":"c0d7ab06a13e105928e91b81a2d3a35310b44043"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-htmlclean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-htmlclean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-htmlclean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-htmlclean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anseki","download_url":"https://codeload.github.com/anseki/gulp-htmlclean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247583469,"owners_count":20962038,"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":["clean","comment","compress","gulp","gulpplugin","html","javascript","lightweight","linebreak","minify","svg","unneeded-whitespaces","whitespace"],"created_at":"2024-11-06T01:43:44.111Z","updated_at":"2025-04-07T02:34:24.164Z","avatar_url":"https://github.com/anseki.png","language":"JavaScript","readme":"# gulp-htmlclean\n\n[![npm](https://img.shields.io/npm/v/gulp-htmlclean.svg)](https://www.npmjs.com/package/gulp-htmlclean) [![GitHub issues](https://img.shields.io/github/issues/anseki/gulp-htmlclean.svg)](https://github.com/anseki/gulp-htmlclean/issues) [![David](https://img.shields.io/david/anseki/gulp-htmlclean.svg)](package.json) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nThis [gulp](http://gulpjs.com/) plugin is wrapper of [htmlclean](https://github.com/anseki/htmlclean).\n\n* [Grunt](http://gruntjs.com/) plugin: [grunt-htmlclean](https://github.com/anseki/grunt-htmlclean)\n* [webpack](https://webpack.js.org/) loader: [htmlclean-loader](https://github.com/anseki/htmlclean-loader)\n\n**If you want to just clean files, [Command Line Tool](https://github.com/anseki/htmlclean-cli) is easy way.**\n\nSimple and safety HTML/SVG cleaner to minify without changing its structure.  \nSee [htmlclean](https://github.com/anseki/htmlclean) for options and more information about htmlclean.\n\n## Getting Started\n\n```shell\nnpm install gulp-htmlclean --save-dev\n```\n\n## Usage\n\n`gulpfile.js`\n\n```js\nvar gulp = require('gulp'),\n  htmlclean = require('gulp-htmlclean');\n\ngulp.task('default', function() {\n  return gulp.src('./develop/*.html')\n    .pipe(htmlclean({\n        protect: /\u003c\\!--%fooTemplate\\b.*?%--\u003e/g,\n        edit: function(html) { return html.replace(/\\begg(s?)\\b/ig, 'omelet$1'); }\n      }))\n    .pipe(gulp.dest('./public_html/'));\n});\n```\n\nSee [htmlclean](https://github.com/anseki/htmlclean#options) for the options.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanseki%2Fgulp-htmlclean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanseki%2Fgulp-htmlclean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanseki%2Fgulp-htmlclean/lists"}