Results 1 to 3 of 3

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

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext JS Premium Member cmeans's Avatar
    Join Date
    Jun 2010
    Location
    Chicago, IL USA
    Posts
    115
    Vote Rating
    7
      0  

    Default 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
    Location
    Kansas
    Posts
    1,694
    Vote Rating
    232
      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
    Director of Engineering - Frameworks (Ext JS / Sencha Touch)

    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
    115
    Vote Rating
    7
      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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •