You found a bug! We've classified it as SDKTOOLS-335 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User interfasys's Avatar
    Join Date
    Mar 2011
    Location
    UK & Switzerland
    Posts
    125
    Vote Rating
    1
    interfasys is on a distinguished road

      1  

    Default [FR] Hooks into the compilation process

    [FR] Hooks into the compilation process


    When building an app, we already have pre and post hooks for building the "page" and the css, but it would be useful to be able to intervene during the compilation process since it includes several steps.

    I'd love to be able to use my own pre-processor to get rid of console.log calls per example. The most efficient way to do this would be after the file is concatenated, just before the actual compilation process.

    Olivier - interfaSys
    Developing custom solutions for BlackBerry 10 using Sencha Touch.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a feature request in our bug tracker.

  3. #3
    Sencha User interfasys's Avatar
    Join Date
    Mar 2011
    Location
    UK & Switzerland
    Posts
    125
    Vote Rating
    1
    interfasys is on a distinguished road

      0  

    Default


    While we wait, this might work for some of you. Edit your build-impl.xml and add this:
    Code:
    <target name="-after-page">
            <if>
                <equals arg1="${args.environment}"
                        arg2="package"/>
                <then>
                    <replaceregexp match="console.log\([^()][^;|^}]*\)"
                                   replace=""
                                   flags="gis"
                                   file="${workspace.build.dir}/package/app.js"/>
                </then>
            </if>
    </target>
    Olivier - interfaSys
    Developing custom solutions for BlackBerry 10 using Sencha Touch.

Thread Participants: 1