node.js - 如何使用 gulp 创建 foo-example/index.html 而不是 foo-example.html?
问题描述
我gulp
用来组装我的网站。默认情况下,npm run build:prod
创建一个dist
包含所有 HTML 文件的文件夹,它们的存储方式如下:
index.html
foo.html
bar.html
有没有办法将它们存储为:
index.html
foo/index.html
bar/index.html
我认为我gulpfile
的这一部分很有用,但dest
设置的是目录,而不是整个文件。
return gulp
.src(["dist/*.html"])
.pipe(posthtml(plugins))
.pipe(gulp.dest(paths.dist));
解决方案
推荐阅读
- java - 错误:不兼容的类型:CAP#1 无法转换为 int[](Java、Android Studio)
- ruby-on-rails - 如何使用draper和cancancan?
- r - 在 R 中按条件和相关结果生成一系列时间戳
- azure - Azure 媒体服务是否有支持的视频编码 MIME 类型列表?
- ansible - 从 Ansible Playbook 访问元组子项中的主机
- python - 功能完成时在 Tkinter GUI 中显示一条消息
- python - 使用 python-pptx 检查图像是否在 powerpoint 中具有装饰性
- desktop - KDE 示例中的 Wayland 会话和 XWayland 配置
- spring - 面临 Spring Boot gradle 的问题
- linux - 使用 Multer-s3 将大文件上传到 AWS s3 期间的连接重置