Reputation: 725
I need to create a build script using ant which copy all the files to destination folder but which exclude all js, css files which are not minified.
folder item will be like this:
lib/abc.js and lib/abc.min.js
-<include name="**/lib/**/*.min.js" />
because my root contains lots of .html,.txt files which i need to copy to destination folder. I need something like include all and exclude this particular unminifyed files in the lib folder. I cant use <exclude name="**/lib/**/*.js" />
which exclude minifed JS also.Upvotes: 0
Views: 375
Reputation: 725
Finally created answer myself. will only copy minifyed js, css file from libs folder
<property name="dest" location="build_release/project" />
<target name="create package">
<copy todir="${dest}">
<fileset dir="public_html">
<exclude name = "/js/libs/**"/>
<exclude name = "/css/libs/**"/>
</fileset>
<fileset dir="public_html">
<include name = "/js/libs/**/*.min.js"/>
<include name = "/css/libs/**/*.min.css"/>
</fileset>
</copy>
</target>
Any doubts you can ask on comments.
Upvotes: 1