gulp-hawksprite
v0.1.2
Published
> npm install gulp-hawksprite
Downloads
3
Readme
css合并
安装
npm install gulp-hawksprite
插件的使用(gulpfile.js)
var gulp = require('gulp'),
hawksprite = require('gulp-hawksprite');
gulp.task('default', function() {
gulp.src('./*.html')
.pipe(hawksprite())
.pipe(gulp.dest('dest/'));
});
示例html代码
http://a.cdn.cn/??assets/a1.css,assets/a2.css,assets/a3.css
<!DOCTYPE html>
<html>
<head lang="zh-cmn-Hans">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="assets/mian.css" />
<!-- css:start -->
<!-- css:end -->
<title>cssCombo</title>
</head>
<body>
<link rel="stylesheet" href="assets/a1.css" />
<link rel="stylesheet" href="assets/a2.css" />
<div class="a1">
a1
</div>
<div class="a2">
a2
</div>
<link rel="stylesheet" href="assets/a3.css" />
<div class="a3">
a3
</div>
</body>
</html>