Code Monkey home page Code Monkey logo

ant-mass-minify's Introduction

ANT Mass Minify

Provides a custom ANT task that allows a user to scan a directory and minify all the JavaScript and CSS found. The user may optionally combine all each JS file or CSS file in a given directory into a single consolidated file. The user may also choose to recurse down the directory tree.

Most likely your JavaScript files will have dependancies on other JavaScript files, and thus needs to be included in a particular order. If you opt to combine or consolidate your JavaScript this rule still applies. As such you may use the embedded element to define the order of compressed JS files. Please note that you do not have to specify the order of all your JS files. As an example assume we have 5 JS files. If you specify the order for two of them as 1 and 2, then those two will be included first, then the remaining will be placed at the end in the order they were processed.

As another example assume we have 10 JS files. If you specify the order for two of them as 1 and 2, and another two as 4 and 5, then the remaining 6 will be placed in the first gap. That means they will be placed at position 3, after the first two, and before the last two.

NOTE: This is still a work in progress

Example:

<massminify dir="/some/path/here/1" minifyjs="true" minifycss="true" combinecss="all-css.min.css" />
<massminify dir="/some/path/here/2" minifyjs="true" combinejs="all-js.min.js" recurse="true" />
<massminify dir="/some/path/here/3" minifyjs="true" consolidatejs="all-js-everywhere.min.js" recurse="true" />
<massminify dir="/some/path/here/4" minifyjs="true" consolidatejs="all-js-everywhere.min.js" recurse="true">
   <order file="library.js" position="1" />
   <order file="file2.js" position="2" />
   <order file="last.js" position="4" />
</massminify>

ant-mass-minify's People

Contributors

adampresley avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

laguz81

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.