Html 在构建BlackBerry WebWorks或PhoneGap应用程序时,如何缩短开发周期?

Html 在构建BlackBerry WebWorks或PhoneGap应用程序时,如何缩短开发周期?,html,cordova,blackberry-webworks,blackberry-10,Html,Cordova,Blackberry Webworks,Blackberry 10,我很想听听WebWorks开发人员是如何通过使用任何巧妙的构建过程/测试技术在开发周期中节省时间的 为了减少构建和测试WebWorks(或PhoneGap)应用程序所需的时间,您会推荐哪些技巧和窍门 例如,Demian Borba提出了一个很好的建议(): 构建一次应用程序,但将其配置为从dev web服务器加载其起始页 对该内容进行更改,这些更改将在重新启动应用程序时反映出来(无需重新编译/重新部署应用程序) 甚至可以使用Livereloader使其速度更快 如果您使用ant,以下是一些有用的

我很想听听WebWorks开发人员是如何通过使用任何巧妙的构建过程/测试技术在开发周期中节省时间的

为了减少构建和测试WebWorks(或PhoneGap)应用程序所需的时间,您会推荐哪些技巧和窍门

例如,Demian Borba提出了一个很好的建议():

  • 构建一次应用程序,但将其配置为从dev web服务器加载其起始页
  • 对该内容进行更改,这些更改将在重新启动应用程序时反映出来(无需重新编译/重新部署应用程序)
  • 甚至可以使用Livereloader使其速度更快

  • 如果您使用ant,以下是一些有用的目标:

    <target name="zip" depends="init" description="Archive your files before building the bar" >
        <zip
            destfile="${build.dir}/${type.name}.zip"
            basedir="${basedir}"
            excludes="*.project,*.settings/,.*properties,*.svn,*.svn/*, builder/, .gitignore, .git/*"
            includes="*,WebContent/"
        />
    </target>
    
    <target name="bar" depends="zip" description="create the bar file" >
        <exec executable="${bbwp}">
            <env key="JAVA_HOME" path="${sdk.JAVA_HOME}" />
            <arg value="${build.dir}/${type.name}.zip"/>
            <arg line="-o '${build.dir}'" />
            <arg line="-v" />
    
            <!-- Allows debugging on port 1337 -->
            <arg line="-d" />
            <!-- Sign to Appworld -->
            <!-- <arg line="-g ${keyPass} - -buildId 10" />  -->
        </exec>
    </target>
    
    <target name="install" depends="bar"  description="Deploy the the .bar file to your simulator. The old application is automatically uninstalled." >
        <java jar="${BarDeploy.dir}/BarDeploy.jar"
        fork="true"
        maxmemory="512M"
        >
            <env key="JAVA_HOME" path="${sdk.JAVA_HOME}" />
            <arg value="-installApp" />
            <arg value="-launchApp" />
            <arg value="-password" />
            <arg value="${password}" />
            <arg value="-device" />
            <arg value="${simIP}" />
            <arg value="-package" />
            <arg value="${bar.file}" />
        </java>
    </target>
    
    <target name="uninstall" description="Uninstall an application from the Simulator. " >
        <java jar="${BarDeploy.dir}/BarDeploy.jar"
        fork="true"
        maxmemory="512M"
        >
            <env key="JAVA_HOME" path="${sdk.JAVA_HOME}" />
            <arg value="-uninstallApp" />
            <arg value="-password" />
            <arg value="${password}" />
            <arg value="-device" />
            <arg value="${simIP}" />
            <arg value="-package" />
            <arg value="${bar.file}" />
        </java>
    </target>
    
    
    
    下面是windows环境的变量示例:

    <property name="password" value=""/>
    <property name="simIP" value="169.254.0.1" />
    <property name="keyPass" value="" />
    
    <property name="sdk.HOME" location="C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.1.8" />
    <property name="build.dir" location="${basedir}\build" />
    <property name="bar.file" location="${build.dir}\device\${type.name}.bar" />
    <property name="sdk.JAVA_HOME" location="C:\Program Files\Java\jre6" />
    <property name="bbwp" location="${sdk.HOME}\bbwp.bat" />
    <property name="BarDeploy.dir" location="${sdk.HOME}\dependencies\tools\lib" />
    
    
    
    黑莓刚刚发布了官方的

    有趣的问题,但我认为它不适合这个董事会: