【问题标题】:Use Gulp to modify the html tag使用 Gulp 修改 html 标签
【发布时间】:2015-04-17 17:41:34
【问题描述】:

我们在构建过程中使用 Gulp,它运行良好。我们使用 gulp-inject 将 CSS 和 JS 文件注入到我们的 index.html 中,语法如下:

<!-- inject:css -->

有没有办法可以在 html 标签中注入属性?在我们的开发环境中,我们只想拥有

<html>

在生产环境中,我们希望添加清单标签以指向我们的 appcache 文件:

<html manifest="/myapp.appcache">

【问题讨论】:

    标签: html gulp html5-appcache gulp-inject


    【解决方案1】:

    你可以使用这个 npm 包https://www.npmjs.com/package/gulp-dom

    【讨论】:

      猜你喜欢
      • 2012-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-06
      • 2013-01-21
      相关资源
      最近更新 更多