Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wechat-miniprogram/miniprogram-slim
https://github.com/wechat-miniprogram/miniprogram-slim
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wechat-miniprogram/miniprogram-slim
- Owner: wechat-miniprogram
- License: mit
- Created: 2020-04-20T12:57:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T02:36:25.000Z (about 2 years ago)
- Last Synced: 2024-12-10T07:10:57.252Z (24 days ago)
- Language: JavaScript
- Size: 1.41 MB
- Stars: 127
- Watchers: 3
- Forks: 13
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 小程序瘦身工具
通过剔除无用文件、压缩图片、复用代码等方式减少小程序代码包体积。
## 功能
* [依赖分析,查找无用文件](./docs/deps.md)
* [代码相似度比较](./docs/jscpd.md)
* [生成雪碧图代码](./docs/sprite.md)
* [图片压缩](./docs/imagemin.md)## 安装
```js
npm install -g miniprogram-slim
```## 使用
```js
Usage: miniprogram-slimOptions:
-v, --version output the version number
-h, --help output usage informationCommands:
cpd [options] Detect duplications in source code
sprite [options] Covert images into css sprites
imagemin [options] Minify images seamlessly
analyzer [options] Analyze dependencies of miniprogram, find out unused filesExamples:
$ miniprogram-slim analyzer -t
$ miniprogram-slim cpd src
$ miniprogram-slim imagemin images/**/*.png
$ miniprogram-slim sprite -f emoji images/**/*.png
```