2015-11-02 69 views
3

我想使用index.php文件,而不是index.html的我烬应用。灰烬CLI:的index.php,而不是index.html的

我发现我可以设置在我的余烬-CLI-build.js文件下面,将输出我的index.html作为的index.php

outputPaths: { 
     app: { 
     html: 'index.php' 
     } 
    } 

但与此,输入文件仍必须命名为index.html。

有谁知道如何配置应用程序,以便有一个名为index.php的源文件了。

回答

3

我无法找到一个方法来重命名源文件,但我没有问题加入PHP的index.html文件,并有它复制到index.php的构建。

我也碰到一个问题,但在那里进行此更改后的MD5指纹图谱不再更新。

,我发现这里的解决方案https://github.com/ember-cli/ember-cli/issues/5658 从过去后改编:

// in ember-cli-build.js 
var app = new EmberApp(defaults, { 
    // Add options here 
    fingerprint : { 
     replaceExtensions : [ 'html', "php", 'css', 'js' ] 
    }, 
    outputPaths : { 
     app : { 
      html : 'index.php', 
     } 
    } 
});