Как я могу исключить файлы

Используя CMD из Sencha Architect, я смог создать производственную сборку своего приложения. Однако я не могу понять, как исключить файл js из процесса сборки. Я не хочу, чтобы он был скомпилирован с app.js. Я хочу, чтобы он был отдельным сценарием, включенным в index.html - поэтому cmd не должен касаться его.

Sencha Arhitech генерирует и вызывает build.xml, который вызывает build-impl.xml, который вызывает init-impl.xml

Везде, где я читал, говорится, что они включают следующее;

<target name="-before-init">
    <echo>Setting build.operations...</echo>
    <echo>app.dir=${app.dir}</echo>
    <property name="build.operations">
        exclude
            -file=\resources\js\version.js
    </property>
</target>

Однако он отказывается исключать файл... Я вижу эхо, так что я знаю, что он попадает в цель...

Есть идеи? Это как я должен исключить файлы?

app.framework.version = 4.2.1.883 app.cmd.version = 4.0.4.84

2 ответа

Решение

Оказывается, это будет невозможно сделать, пока Sencha Architect 3.1

Steps by which i was able to exclude AppConfig file in production build. 
Here file exclude means it will not be compressed/bundled and  variable/properties of this file could be used any where in the app. 

1. Config file(AppConfig.js in our case) MUST be inside resources fodler.  Below are the contents of our AppConfig file

/////////////IxDetect is my Application Namespace///////////////////
var IxDetect = IxDetect || {};

IxDetect.AppConfig = {
    logoPath: '',
    logoTitle: 'Internal',
    pentahoUrl: 'http://107.20.104.150/pentaho',
   pentahoRptCube: 'TrafficWithFraudIndex'
};
////////////////////////////////

2. Link this file in index.html page like below
<script src="resources/AppConfig.js"></script>

3. Add one more item in "js" array in "app.json" file

"js": [
        {
            "path": "resources/AppConfig.js", // This is my file. Also make a sure you do not miss bundle and includeInBundle property
            "bundle": false, 
            "includeInBundle": true
        },
        {
            "path": "app.js",
            "bundle": true
        }
],

4. Try development and production build all should work file

Note: All above changes are done and tested on 6.2(Framework/CMD) 
Другие вопросы по тегам