【问题标题】:Running Grunt Build does not compile jade files运行 Grunt Build 不会编译翡翠文件
【发布时间】:2015-05-29 09:34:36
【问题描述】:

我实现了 Jade 模板引擎 Yeoman-AngularJS 应用程序,它在我的本地运行良好。

但在部署时,运行Grunt Build 不会编译 .jade 文件。 这就是为什么我在生产中收到错误Cannot GET /

【问题讨论】:

    标签: yeoman grunt-contrib-jade


    【解决方案1】:

    您可以在输出文件夹中查看是否正确生成了 html 文件。 您可以在 grunt 文件中看到目标文件夹(在我的情况下为 .tmp)和特定选项。可能 src 规则与您的源文件不匹配。

        // Compiles Jade to html
    jade: {
      compile: {
        options: {
          data: {
            debug: false
          }
        },
        files: [{
          expand: true,
          cwd: '<%= yeoman.client %>',
          src: [
            '{app,components}/**/*.jade'
          ],
          dest: '.tmp',
          ext: '.html'
        }]
      }
    },
    

    【讨论】:

      猜你喜欢
      • 2014-04-28
      • 1970-01-01
      • 1970-01-01
      • 2016-07-15
      • 2013-11-27
      • 2015-07-20
      • 1970-01-01
      • 2013-08-13
      • 1970-01-01
      相关资源
      最近更新 更多