我正在尝试使用 sencha sdk 来生成我的缩小文件。
我的页面设置在
http://www.mysite.localhost/ext/jobs/index.html
仅从 index.html 读取是不容易的。当我进入
sencha create jsb -a http://www.mysite.localhost/ext/jobs/index.html -p app.jsb3
我得到以下 jsb 文件。
{
"projectName": "Project Name",
"licenseText": "Copyright(c) 2011 Company Name",
"builds": [
{
"name": "All Classes",
"target": "all-classes.js",
"options": {
"debug": true
},
"files": []
},
{
"name": "Application - Production",
"target": "app-all.js",
"compress": true,
"files": [
{
"path": "",
"name": "all-classes.js"
},
{
"path": "",
"name": "app.js"
}
]
}
],
"resources": []
}
即它不包括我所有的课程。如果我更新
“路径”:“app/”,“名称”:“app.js”
app-all.js 已正确创建。但是我怎样才能得到控制器和视图。有很多文件。有没有人有任何示例 mvc 应用程序 jsb。我的应用程序基于潘多拉。
应用程序/app.js
Ext.Loader.setConfig({ enabled: true });
Ext.application({
name: 'Pandora',
models: ['Part', 'Material', 'Job', 'Process', 'Invoice', 'InvoiceDetail', 'PurchaseOrder'],
stores: ['SalesContact', 'Parts', 'Materials', 'Jobs', 'AccountHandlers', 'JobTypes', 'Processs', 'Artwork', 'Varnish', 'VarnishType', 'PrintType', 'ProofRequired', 'InvoiceDetails', 'PurchaseOrders'],
controllers: ['Part', 'Material', 'Job', 'Process', 'Invoice'],
launch: function () {
Ext.QuickTips.init();
var cmp1 = Ext.create('App.view.Jobs', {
renderTo: "form-job"
});
cmp1.show();
}
});
索引.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="ext-all-debug.js"></script>
<script type="text/javascript" src="app/app.js"></script>
</head>
<body>
<div id="form-job"></div>
</body>
</html>