1
是否有可能达到吞噬根文件夹以外的文件(css/js/img)。对于例如我在我的项目中有一个全局文件夹,其中包含所有全球资产。问题是,吞咽不能读取这些文件。在吞噬文件夹外达到文件
结构示例:
global-assets
└─microsites
└─gulpfile.js
咕嘟咕嘟任务:
gulp.task('htmlSSI', function() {
gulp.src('dev/templates/*.html')
.pipe(includer())
.pipe(gulp.dest('dist/'));
});
模板文件:
<!--#include virtual="../../../../global-assets/templates/_header.html" -->
<!--#include virtual="_main-content.html" -->
<!--#include virtual="../../../../global-assets/templates/_footer.html" -->
请向我们展示您的任务代码。 – halfzebra
对不起,我忘记了密码。现在它在那里。 – Gabriel