文章詳情頁
javascript - gulp-ejs怎么導(dǎo)出.html文件
瀏覽:192日期:2023-05-05 15:03:48
問題描述
為什么我這樣導(dǎo)出的還是.ejs
gulp.task(’ejs’, function() {
gulp.src(’html/index.ejs’) .pipe(ejs({},{ext: ’.html’})).pipe(gulp.dest(’./dist’));
});
問題解答
回答1:gulp.task(’ejs’, function() { gulp.src(’html/index.ejs’).pipe(ejs({},{},{ext: ’.html’})).pipe(gulp.dest(’./dist’));});
ejs(data, options, settings)
看官網(wǎng),第二個(gè)參數(shù)是options,第三個(gè)參數(shù)才是settings,你上面那么寫是把{ext: ’.html’}賦值給options了。官網(wǎng)地址
標(biāo)簽:
JavaScript
上一條:javascript - var str= ’asd,asd,12,321,,123,6,yrtv,x,z’; 獲取其中數(shù)字,有多少種方法下一條:javascript - 關(guān)于element ui表格動(dòng)態(tài)加載數(shù)據(jù)問題
相關(guān)文章:
1. 關(guān)docker hub上有些鏡像的tag被標(biāo)記““This image has vulnerabilities””2. docker鏡像push報(bào)錯(cuò)3. Docker for Mac 創(chuàng)建的dnsmasq容器連不上/不工作的問題4. javascript - 在 model里定義的 引用表模型時(shí),model為undefined。5. 利用IPMI遠(yuǎn)程安裝centos報(bào)錯(cuò)!6. node.js - mongodb查找子對(duì)象的名稱為某個(gè)值的對(duì)象的方法7. 運(yùn)行python程序時(shí)出現(xiàn)“應(yīng)用程序發(fā)生異?!钡膬?nèi)存錯(cuò)誤?8. html5和Flash對(duì)抗是什么情況?9. phpstudy8.1沒集成mysql-front10. 前端 - @media query 使用出現(xiàn)的問題?
排行榜

熱門標(biāo)簽
網(wǎng)公網(wǎng)安備