2015-11-02 72 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', 
     } 
    } 
});