Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whxaxes/cssv
给页面链接添加版本号
https://github.com/whxaxes/cssv
Last synced: 28 days ago
JSON representation
给页面链接添加版本号
- Host: GitHub
- URL: https://github.com/whxaxes/cssv
- Owner: whxaxes
- Created: 2015-01-23T09:48:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-19T06:11:18.000Z (over 9 years ago)
- Last Synced: 2024-10-05T02:08:07.724Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 340 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# CSSV:给html文件里的链接添加版本号
## Install:
安装:`npm install cssv -g`## Usage:
1、打开要添加版本号的项目目录
2、打开当前目录下的控制台,输入`cssv -a`回车即可给当前目录下的所有html文件里的css链接添加版本号
3、输入`cssv -r`则可以移除所有css链接的版本号还有其他命令:
`cssv -a` 不带其他命令默认只添加css的版本号
`cssv -a -c|-i|-j` 添加css或image或js链接的版本号
`cssv -a -A` 三个文件都添加版本号
例
```
"../../css/ohh.css" ====> ../../css/ohh.css?v=2f701
"../../css/abc.css" ====> ../../css/abc.css?v=4ab85
"../../css/hahah/abc.css" ====> ../../css/hahah/abc.css?v=cdf83
```cssv -a -C 深层次更改版本号,前面添加版本号是`?v=XXX`,添加-C命令后,则直接修改文件名。
例:
```
"../../css/ohh.css" ====> ../../css/ohh_42ce52f701.css
"../../css/abc.css" ====> ../../css/abc_42ce54ab85.css
"../../css/hahah/abc.css" ====> ../../css/hahah/abc_e132d3d52d.css
```