2016-11-29 37 views
0

我正在嘗試設置一個Sencha extjs 6項目。我希望能夠提供現代和經典的軟件包。我正在遵循這個設置tutorial,但我沒有發現它非常有幫助。設置Sencha extjs項目

如果我的理解是正確的,我應該可以有一個可以作爲桌面和移動網站訪問的應用程序。這很好,適用於未編譯的路徑(我的應用程序位於root/sencha文件夾中)mysite.com/sencha。但是,如果訪問根站點,它也會爲我提供未編譯的路徑,而不是使用構建app.js.

我的索引頁是root/layouts/index.html。我的extjs應用程序在root/sencha

我app.json的相關部分:

... 
"indexHtmlPath": "../layouts/index.html", 
"production": { 
    "output": { 
     "page": { 
      "path": "../../../../layouts/index.html", 
      "enable": false 
     }, 
     "appCache": { 
      "enable": true, 
      "path": "cache.appcache" 
     }, 
     "microloader": { 
      "path": "microloader.js", 
      "embed": false, 
      "enable": true 
     } 
    }, 
    "loader": { 
     "cache": "${build.timestamp}" 
    }, 
    "cache": { 
     "enable": true 
    }, 
    "compressor": { 
     "type": "yui" 
    } 
}, 
"output": { 
    "base": "${workspace.build.dir}/${build.environment}/${app.name}", 
    "page": "index.html", 
    "manifest": "${build.id}.json", 
    "js": "${build.id}/app.js", 
    "appCache": { 
     "enable": false 
    }, 
    "resources": { 
     "path": "${build.id}/resources", 
     "shared": "resources" 
    } 
}, 
... 
+0

有點困惑從你的Q,但只是運行'sencha應用程序構建'並複製生成文件夾的內容到您的Web服務器。 – pagep

回答

0

由於pagep建議你只在生產服務器上部署構建/生產目錄的內容,而不是源代碼。這樣你只能部署最小化和壓縮的文件(classic/app.js,classic/resources/YourApp.css,modern/app.js,modern/resources/YourApp.css等)。