You found a bug! We've classified it as SDKTOOLS-247 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member cmeans's Avatar
    Join Date
    Jun 2010
    Location
    Chicago, IL USA
    Posts
    112
    Vote Rating
    7
    cmeans is on a distinguished road

      0  

    Default How to add licence text to all-classes.js during build process?

    How to add licence text to all-classes.js during build process?


    I'd like to make sure that the all-classes.js file includes Sencha's and my company's licensing info.

    Obviously I can manually add it after the build process, but is there an easy way to get it in automatically?

    Thanks.

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,346
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    I will open this as a Feature Request, but for now you could do this in your build.xml like so:

    Code:
       <target name="-after-page">
          <move file="${build.dir}/all-classes.js"
             tofile="${build.dir}/all-classes.js2"/>
    
          <concat destfile="${build.dir}/all-classes.js">
             <header filtering="no" trimleading="yes">
                 Copyright ...
             </header>
             <fileset file="${build.dir}/all-classes.js2"/>
          </concat>
       </target>
    I haven't tested the above, but it should be pretty close. See http://ant.apache.org/manual/ for details.

    The "-after-page" target is not (yet) documented in build.xml but "-after-build" would work as well.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Ext JS Premium Member cmeans's Avatar
    Join Date
    Jun 2010
    Location
    Chicago, IL USA
    Posts
    112
    Vote Rating
    7
    cmeans is on a distinguished road

      0  

    Default


    Thanks Don,

    That did it. Just needed to add an extra command to clean up the temp file.

    Code:
        <target name="-after-page">
          <move file="${build.dir}/all-classes.js"
             tofile="${build.dir}/all-classes.js2"/>
    
          <concat destfile="${build.dir}/all-classes.js">
             <header filtering="no" trimleading="yes">
    /*
     Portions Copyright (c) 2006-2012, Sencha Inc.
     All rights reserved.
     http://www.sencha.com
                 
     Portions Copyright (c) 2012 SpatialPoint, LLC. 
     All rights reserved.
     http://www.spatialpoint.com
    */
             </header>
             <fileset file="${build.dir}/all-classes.js2"/>
          </concat>
          <delete file="${build.dir}/all-classes.js2" />
       </target>

Thread Participants: 1