음, 빌드와 도장에 관한 모든 것을 읽었습니다. 3 일 악몽 등 ... 도움이 필요해.도조에서 빌드하기 1.7.2
저는 마지막 버전의 도장을 사용하고 있습니다. 1.7.2 지역 : 내가
./build.sh profile=../../../../myApp/myApp.profile.js releaseDir=../../../release
이 빌드 스크립트를 사용하여 다음
dependencies = {
stripConsole: "all",
action: "release",
optimize: "shrinksafe",
layerOptimize: "shrinksafe",
//optimize: "closure",
//layerOptimize: "closure",
//mini: true,
//localeList : 'en-us',
//cssOptimize: "comments",
//selectorEngine: "acme",
releaseName: "content7",
layers: [
{
// This is a specially named layer, literally 'dojo.js'
// adding dependencies to this layer will include the modules
// in addition to the standard dojo.js base APIs.
name: "dojo.js",
customBase : true,
dependencies: [
"dojo.fx",
"dijit.form.Button",
"dojox.gauges.AnalogGauge",
"dojox.gauges.AnalogArcIndicator",
"dojox.gauges.AnalogNeedleIndicator",
"myApp.smartmix"
]
}
],
prefixes: [
[ "dijit", "../dijit" ],
[ "dojox", "../dojox" ],
[ "myApp", "../../../myApp" ]
]
};
그리고 나는
을 가지고 :</sites/somesite/scripts/dojo17>
which contains
--dojo
--dijit
--dojox
--utils
나는 다음과 같은 프로파일을 사용
375,지금 내 index.html 파일에 나는
<script type="text/javascript">
//<![CDATA[
var djConfig = {
parseOnLoad: true,
isDebug: false,
modulePaths: {
'myApp': '../myApp'
}
};
//]]>
</script>
<script type="text/javascript" src="scripts/release/content7/dojo/dojo.js"></script>
<script>
dojo.require('myApp.smartmix');
</script>
을 그리고 YES이 153 개 파일을 빌드하지 않고로드 (230 개) 파일을 줄일 수 있습니다. 하지만 여전히 하나 또는 두 개의 파일로 축소 할 수 있다고 믿고 싶습니다. 하지만 HOW ?????
제발, 어떤 도움을 주시면 감사하겠습니다 !!!!
** 1 ** : 정말 아주 약간의 .js를 원하기 때문에 확인 지금 막 들어,'customBase'를 제거합니다. ** 둘째 ** : 내 html이 다른 모든 .js (153 개 파일 !!!!)를 호출 할 필요가 없도록 모든 종속성이있는 축소 된 .js가 필요합니다. *** 셋째 *** 빌드가 여전히 153 개의 파일을 만들었습니다. 난 단지 하나의 파일 안에 모든 의존성이 있어야한다. – Agustincl
Dojo는 여전히 모든 개별 파일을 작성하지만이를 배치 할 필요는 없습니다. 계층에 대해 생성 된 파일 만 배포하면됩니다. 나는 * 모든 * 사용자 정의 JS를 모으는 계층이있는 사용자 프로필에는 표시되지 않으며 사용자가 필요합니다. – mtyson