{"id":19245693,"url":"https://github.com/henryckh/website-minifier","last_synced_at":"2026-05-01T18:32:50.979Z","repository":{"id":126706612,"uuid":"134435588","full_name":"henryckh/website-minifier","owner":"henryckh","description":"Javascript, CSS, HTML gulp minify example","archived":false,"fork":false,"pushed_at":"2019-01-23T09:09:40.000Z","size":177,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-08T13:54:04.358Z","etag":null,"topics":["css","cssminifier","gulp","nodejs"],"latest_commit_sha":null,"homepage":"","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/henryckh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-22T15:25:24.000Z","updated_at":"2023-03-04T05:00:48.000Z","dependencies_parsed_at":"2023-06-17T18:16:54.170Z","dependency_job_id":null,"html_url":"https://github.com/henryckh/website-minifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/henryckh/website-minifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryckh%2Fwebsite-minifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryckh%2Fwebsite-minifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryckh%2Fwebsite-minifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryckh%2Fwebsite-minifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henryckh","download_url":"https://codeload.github.com/henryckh/website-minifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryckh%2Fwebsite-minifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32508901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["css","cssminifier","gulp","nodejs"],"created_at":"2024-11-09T17:29:03.358Z","updated_at":"2026-05-01T18:32:50.958Z","avatar_url":"https://github.com/henryckh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# website-minifier\n`website-minifier` is an example on how to use different gulp dependencies to minimize Javascript, CSS, HTML.  \n You can keep a copy of original Javascript, HTML, CSS while outputting the minimized Javascript, HTML, CSS to /build.  \n [Gulp](https://github.com/gulpjs/gulp) is a powerful toolkit for automation.\n\nThis project requires gulp \u003e= 4.0.0\n\n## Installation \n```sh\n$npm install\n````\n\nand recommend to install globally gulp\n\n```sh\n$npm install -g gulp\n```\n\n\n## Example Usage\n```js\n// minify and move css from public to build/css \ngulp.task('minify-css', function () {\n    return gulp.src('public/css/*.css')\n        .pipe(cleanCSS())\n        .pipe(gulp.dest('build/css'))\n});\n\n// minify and move js from public to build/js-files\ngulp.task('minify-js', function () {\n    return gulp.src('public/js-files/*.js')\n        .pipe(uglify())\n        .pipe(gulp.dest('build/js-files'));\n});\n\n// minify and move html from public to build/\ngulp.task('minify-html', function () {\n    return gulp.src('public/*.html')\n        .pipe(htmlmin({collapseWhitespace: true}))\n        .pipe(gulp.dest('build'));\n});\n\n// custom command to copy files into build\n// ! stand for exclude\ngulp.task('move', function () {\n   return  gulp.src([\n       'public/**/*',\n       '!public/css/**',\n       '!public/js-files/**',\n       '!public/css',\n       '!public/js-files',\n       '!public/*.html'\n   ])\n       .pipe(gulp.dest('build'))\n});\n\ngulp.task('minify', gulp.parallel('minify-js', 'minify-css', 'minify-html'));\ngulp.task('build', gulp.series('minify', 'move'));\n```\nand run the script with the command as defined above if you have  \ngulp installed globally\n\n```sh\n$gulp minify \n```\n\nelse run \n\n```sh\n$npx gulp minify\n```\n\nor\n \n```sh\n./node_modules/.bin/gulp minify\n```\n\n## Build the website to /build directory\n\nBuild the minify css, javascript and html to /build.\n```sh\n$gulp build\n```\n\nor \n\n```sh\n$./node_modules/.bin/gulp build\n```\n\n## Run Website and Inspect the different\n```sh\n$npm start\n```\nOriginal Website: http://localhost:3000\nMinimized Website: http://localhost:3000/build\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenryckh%2Fwebsite-minifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenryckh%2Fwebsite-minifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenryckh%2Fwebsite-minifier/lists"}