0.3.2 • Published 11 years ago

grunt-aggregator v0.3.2

Weekly downloads
17
License
-
Repository
github
Last release
11 years ago

GruntAggregator

Aggregates file groups (aka aggregations): Minifies files with include/exclude wildcards, creates an index and debug index of the minified files, and runs lint and copy tasks. GruntAggregator also include a modify task, which allows manipulation of file name and content

Tasks

aggregate task

Aggregate is a multitask, which creates multiple minified files, copies the original files (for debugging) and creates an {index}.json file with aggregation mapping. In addition, a {index}.debug.json if created, mapping the full, unminified version of the content. This is useful if you're running your application in debug mode.

Usage:

// Project configuration.
grunt.initConfig({
    aggregate:{
                main:{
                    src:         'deployment/main.json',
                    manifest:    'target/main/index.json',
                    manifestCopy:'src/main/index.json', // Optional
                    min: true, // Optional, default is true
                    lint: true, // Optional, default is true
                    copy: true // Optional, default is true
                }
            },
});

deployment/main.json

// Project configuration.
[
    {
        "id":                 "bootstrap", // Minified file name will be {id}.min.js
        "sourceDir":          "src/javascript", // Root source folder
        "package":            "bootstrap", // A subfolder within the source. will be copied to same relative path within the target
        "targetDir":          "javascript", // Target root
        "excludeFromManifest":false, // Optional used to create a minified file and exclude it from manifest index
        "tags": [   // Will be copied to index.json file
            'some tag'
        ],
        "atPhase": "MyPhase", // Optional, will be copied to index.json file
        "include":            [
            "**/*.js" // will aggregate all the js files from src/javascript/bootstrap to target/main/bootstrap
        ],
        "exclude":            ["**/~*"]
    }
]

Development

Testing

To run test suite: 1. Install grunt globally npm install -g grunt 2. Simply run grunt grunt to see all tests passing

0.3.2

11 years ago

0.3.1

11 years ago

0.2.27

11 years ago

0.2.26

11 years ago

0.2.25

11 years ago

0.2.24

11 years ago

0.2.23

11 years ago

0.2.22

11 years ago

0.2.21

11 years ago

0.2.20

11 years ago

0.2.19

11 years ago

0.2.18

11 years ago

0.2.16

11 years ago

0.2.15

11 years ago

0.2.14

11 years ago

0.2.13

11 years ago

0.2.12

11 years ago

0.2.11

11 years ago

0.2.10

11 years ago

0.2.9

11 years ago

0.2.8

11 years ago

0.2.7

11 years ago

0.2.6

11 years ago

0.2.5

11 years ago

0.2.4

11 years ago

0.2.3

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.15

11 years ago

0.1.13

11 years ago

0.1.12

11 years ago

0.1.11

11 years ago

0.1.10

11 years ago

0.1.9

11 years ago

0.1.8

11 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago