gulp-mill-res
v1.0.3
Published
tnpm install -g @tencent/mill-cli
Downloads
3
Readme
安装 gulp-mill-res
tnpm install -g @tencent/mill-cli
介绍
主要解析HTML引入components文件夹内的组件,将组件统一打包到静态HTML中,并且自动合并去重组件内的CSS和JS,生成独立的地址自动引入到HTML内
HTML引入规范
/*
- components
—— mill-list
—— mill-login
- index.html
*/
<body>
<mill-list></mill-list>
<mill-login></mill-login>
</body>
用法
var gulp = reqire('gulp');
var mill = reqire('@tencent/mill-cli');
gulp.task('h', function(){
gulp.src('./*.html')
.pipe(mill())
.pipe(gulp.dest('./server/'))
})