How do I build a sencha app to target production in a specific folder?

人走茶凉 提交于 2019-12-11 07:15:52

问题


Using the latest Sencha Cmd tool v4.0.2, how do I build an app for production mode into a specific folder not into its default build folder within the app folder.

I am trying to do this from the command line but not succeeding at all. Tried this according to their help on command line but had no success with it for several weeks now:

Sencha Cmd broken: Why does 'app build' ignore any command line parameters?

No-one seems to know what the issue is. Am I the only person in the world who is actually encountering an issue with this!? Any help appreciated from anyone with some knowledge of the Sencha products greatly appreciated.


回答1:


Found the answer to this as the last post in the thread:

http://www.sencha.com/forum/showthread.php?247180-Sencha-Cmd-v3.0.0.190-does-not-use-app.json-buildpath-settings/page2

I added the following to the sencha.cfg within the .sencha\workspace folder.

workspace.build.dir=C:/builds/TolMobile

Not sure why packager.json contains an output path with the following:

"outputPath":"../build/",

It doesn't seem to even be used. If its redundant why don't they just remove it? In addition I still haven't got their command line arguments to work either. Strange.




回答2:


change "outputPath" in packager.json file.

/**
     * @cfg  outputPath
     * @required
     * This is where the built application file with be saved. Make sure that output path is not in your input path, you may get into endless recursive copying
     */
    "outputPath":"../build/",

then build with no cmd parameters .. >sencha app build production




回答3:


To built the builds folder relative to your project. Add to the .sencha/app/sencha.cfg workspace.build.dir=builds/



来源:https://stackoverflow.com/questions/22440574/how-do-i-build-a-sencha-app-to-target-production-in-a-specific-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!