在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ladjs/gulp-jade-usemin开源软件地址(OpenSource Url):https://github.com/ladjs/gulp-jade-usemin开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-jade-usemin
This task is designed for gulp 3.
UsageFirst, install npm install --save-dev gulp-jade-usemin Then, add it to your var usemin = require('gulp-jade-usemin');
var uglify = require('gulp-uglify');
var minifyHtml = require('gulp-minify-html');
var minifyCss = require('gulp-minify-css');
var rev = require('gulp-rev');
gulp.task('usemin', function() {
gulp.src('./*.jade')
.pipe(usemin({
css: [minifyCss(), 'concat'],
html: [minifyHtml({empty: true})],
js: [uglify(), rev()]
}))
.pipe(gulp.dest('build/'));
}); Sample usage in Jade file: //- build:css /css/app.css
block stylesheets
link(rel='stylesheet', href='/css/style.css')
//- endbuild
//- build:js /js/app.js
block scripts
script(src='/js/script1.js')
script(src='/js/script2.js')
//- endbuild Changelog1.1.2
1.1.1
1.1.0
1.0.0
0.0.1
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论