文章詳情頁(yè)
javascript - gulp-ejs怎么導(dǎo)出.html文件
瀏覽:123日期:2023-05-05 15:03:48
問(wèn)題描述
為什么我這樣導(dǎo)出的還是.ejs
gulp.task(’ejs’, function() {
gulp.src(’html/index.ejs’) .pipe(ejs({},{ext: ’.html’})).pipe(gulp.dest(’./dist’));
});
問(wèn)題解答
回答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,你上面那么寫(xiě)是把{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ù)問(wèn)題
相關(guān)文章:
1. datetime - Python如何獲取當(dāng)前時(shí)間2. python 利用subprocess庫(kù)調(diào)用mplayer時(shí)發(fā)生錯(cuò)誤3. html - eclipse 標(biāo)簽錯(cuò)誤4. python - pycharm 自動(dòng)刪除行尾空格5. 安全性測(cè)試 - nodejs中如何防m(xù)ySQL注入6. 請(qǐng)問(wèn)PHPstudy中的數(shù)據(jù)庫(kù)如何創(chuàng)建索引7. python - Pycharm的Debug用不了8. javascript - 關(guān)于apply()與call()的問(wèn)題9. javascript - nginx反向代理靜態(tài)資源403錯(cuò)誤?10. python文檔怎么查看?
排行榜

熱門標(biāo)簽