-
2 Nov 2012 2:00 PM #1
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 Nov 2012 3:41 PM #2
I will open this as a Feature Request, but for now you could do this in your build.xml like so:
I haven't tested the above, but it should be pretty close. See http://ant.apache.org/manual/ for details.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>
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!"
-
2 Nov 2012 4:15 PM #3
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>
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.


Reply With Quote