下載Sencha cmdjavascript
下載ExtJS的SDK包並解壓在某個目錄中
執行sencha -sdk ~/extsdk/ generate app MyExtApp --ext --classic Admin admincss
修改主題
app.json文件html
"theme": "theme-triton", // "theme": "theme-gray", // "theme": "theme-classic",
"extend": "theme-triton"java
"toolkit": "classic", // build多個主題 "builds": { "triton": { "theme": "my-triton" }, "gray": { "theme": "my-gray" }, "classic": { "theme": "my-classic" } }, // 須要ext-locale模塊 "requires": [ "font-awesome", "ext-locale" ], // 支持的語言 "locales": [ "en", "zh_CN" ], "bootstrap": { // 須要增長這一行 "manifest": "${build.id}.json", "base": "${app.dir}", "microloader": "bootstrap.js", "css": "bootstrap.css" }, // 輸入html模板文件 "indexHtmlPath": "index.ejs", "output": { // "base": "${workspace.build.dir}/${build.environment}/${app.name}", // "appCache": { // "enable": false // } // =============== 輸出設置 ============== "base": "${workspace.build.dir}/${build.environment}/${app.name}", // 輸出heml模板文件名 "page": "index.ejs", "manifest": "${build.id}.json", "js": "${build.id}/app.js", "framework": "${build.id}/framework.js", "resources": { "path": "./${build.id}/resources", "images": "./${build.id}/resources/images", "shared": "./resources", "toolkit": "${toolkit.name}/resources", "base": "." }, "deltas": { "enable": false }, "appCache": { "enable": false } }
"production": { "output": { "appCache": { "enable": false } } }
<script type="text/javascript"> var Ext = Ext || {}; // Ext namespace won't be defined yet... Ext.beforeLoad = function (tags) { // 經過主題和語言的選擇指定相應的profile文件 Ext.manifest = 'triton-zh_CN'; // this name must match a build profile name }; </script>