Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deepraining/sclean
一个用于清除由 webpack, gulp 等构建工具生成的过期的 hash 编码的文件. A tool to clean obsolete hash-coded files, which created by building tools, like webpack, gulp.
https://github.com/deepraining/sclean
build build-tool clean frontend gulp obsolete redundant web webpack
Last synced: about 5 hours ago
JSON representation
一个用于清除由 webpack, gulp 等构建工具生成的过期的 hash 编码的文件. A tool to clean obsolete hash-coded files, which created by building tools, like webpack, gulp.
- Host: GitHub
- URL: https://github.com/deepraining/sclean
- Owner: deepraining
- License: mit
- Created: 2018-07-23T13:14:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-24T06:54:21.000Z (over 5 years ago)
- Last Synced: 2024-11-13T11:03:05.576Z (2 days ago)
- Topics: build, build-tool, clean, frontend, gulp, obsolete, redundant, web, webpack
- Language: JavaScript
- Homepage:
- Size: 109 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.en.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# sclean
[中文文档](./README.md)
A tool to clean obsolete hash-coded files, which created by building tools, like webpack, gulp.
## quick start
Install sclean:
```
npm install sclean -g
```## command line
```
sclean [args]
```### `archive`: archive target directory to a zip file
```
sclean archive
```### `restore`: restore target directory to last nth archive state
```
sclean restore [--index index]
```- `index/i`: `int`, default `1`, last nth state to restore
### `clean`: clean obsolete hash-code files
```
sclean clean [--ext ext] [--hash hash]
```- `ext/e`: `type: string` extra html extensions(split by `,`, like `--ext jsp,php`)
- `hash/H`: `type: int` `default: 32` hash length## philosophy of cleaning obsolete files
1. find all hash codes from html files (hashes1)
2. find all hash codes from js files whose file name matches hashes1 (hashes2, async js bundles)
3. delete js and css files whose file name neither matches hashes1 nor hashes2## addition
- sclean only clean js and css files, not other static files