{"id":20420317,"url":"https://github.com/deepraining/sclean","last_synced_at":"2025-04-12T18:08:42.692Z","repository":{"id":135801632,"uuid":"142016536","full_name":"deepraining/sclean","owner":"deepraining","description":"一个用于清除由 webpack, gulp 等构建工具生成的过期的 hash 编码的文件. A tool to clean obsolete hash-coded files, which created by building tools, like webpack, gulp.","archived":false,"fork":false,"pushed_at":"2019-07-24T06:54:21.000Z","size":112,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:08:30.455Z","etag":null,"topics":["build","build-tool","clean","frontend","gulp","obsolete","redundant","web","webpack"],"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/deepraining.png","metadata":{"files":{"readme":"README.en.md","changelog":"CHANGELOG.md","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":"2018-07-23T13:14:57.000Z","updated_at":"2019-07-24T06:54:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"b5a0942a-efc3-406c-82bb-f19d605e3918","html_url":"https://github.com/deepraining/sclean","commit_stats":null,"previous_names":["senntyou/sclean"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepraining%2Fsclean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepraining%2Fsclean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepraining%2Fsclean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepraining%2Fsclean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepraining","download_url":"https://codeload.github.com/deepraining/sclean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610340,"owners_count":21132921,"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":["build","build-tool","clean","frontend","gulp","obsolete","redundant","web","webpack"],"created_at":"2024-11-15T06:42:26.902Z","updated_at":"2025-04-12T18:08:42.670Z","avatar_url":"https://github.com/deepraining.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sclean\n\n[中文文档](./README.md)\n\nA tool to clean obsolete hash-coded files, which created by building tools, like webpack, gulp.\n\n## quick start\n\nInstall sclean:\n\n```\nnpm install sclean -g\n```\n\n## command line\n\n```\nsclean \u003ccommand\u003e [args]\n```\n\n### `archive`: archive target directory to a zip file\n\n```\nsclean archive \u003cdirectory\u003e\n```\n\n### `restore`: restore target directory to last nth archive state\n\n```\nsclean restore \u003cdirectory\u003e [--index index]\n```\n\n- `index/i`: `int`, default `1`, last nth state to restore\n\n### `clean`: clean obsolete hash-code files\n\n```\nsclean clean \u003cdirectory\u003e [--ext ext] [--hash hash]\n```\n\n- `ext/e`: `type: string` extra html extensions(split by `,`, like `--ext jsp,php`)\n- `hash/H`: `type: int` `default: 32` hash length\n\n## philosophy of cleaning obsolete files\n\n1. find all hash codes from html files (hashes1)\n2. find all hash codes from js files whose file name matches hashes1 (hashes2, async js bundles)\n3. delete js and css files whose file name neither matches hashes1 nor hashes2\n\n## addition\n\n- sclean only clean js and css files, not other static files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepraining%2Fsclean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepraining%2Fsclean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepraining%2Fsclean/lists"}