Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Add support for Multiple targets. #582

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

markfredchen
Copy link

The code change focused on change "usemin" task to accept multiple targets. Now it is possible to use 'usemin' task like this:

usemin: {
    app1: {
        src: ['dist/app1/index.html'],
        options: {
            type: 'html',
            assertDirs: ['dist/app1/images/{,*/}*.png']
        }
    },
    app2: {
        src: ['dist/app2/index.html'],
        options: {
            type: 'html',
            assertDirs: ['dist/app2/images/{,*/}*.png']
        }
    },
}

@brunowego
Copy link

👍

@@ -105,19 +105,35 @@ module.exports = function (grunt) {

grunt.registerMultiTask('usemin', 'Replaces references to non-minified scripts / stylesheets', function () {
var debug = require('debug')('usemin:usemin');
var type = this.target;
// If type is not html/css/js and the customized configuration provides 'type' in options. Below is the example.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markfredchen should go to README.

If type is not html/css/js -> If type is different from html/css/js

@micw
Copy link

micw commented Mar 29, 2016

Great patch, +1

@dustin-page
Copy link

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants