lib/cog.js
function prefix(pattern) {
        if (!pattern) {
            pattern = 'grunt-available-tasks';
        }
        pattern = pattern.replace(/^node_modules\//, '');
        var ret;
        if (grunt.file.expand('node_modules/' + pattern).length) {
            ret = 'node_modules/';
        } else if (grunt.file.expand('../../node_modules/' + pattern).length) {
            ret = '../../node_modules/';
        } else if (grunt.file.expand('node_modules/chronicles_of_grunt/node_modules/' + pattern).length) {
            ret = 'node_modules/chronicles_of_grunt/node_modules/';
        } else {
            grunt.fail.fatal("Cannot find module path for " + pattern);
        }
        return ret;
    }
function prefix(pattern) {
        if (!pattern) {
            pattern = 'grunt-available-tasks';
        }
        pattern = pattern.replace(/^node_modules\//, '');
        var ret;
        if (grunt.file.expand('node_modules/' + pattern).length) {
            ret = 'node_modules/';
        } else if (grunt.file.expand('../../node_modules/' + pattern).length) {
            ret = '../../node_modules/';
        } else if (grunt.file.expand('node_modules/chronicles_of_grunt/node_modules/' + pattern).length) {
            ret = 'node_modules/chronicles_of_grunt/node_modules/';
        } else {
            grunt.fail.fatal("Cannot find module path for " + pattern);
        }
        return ret;
    }
function prefix ( pattern ) { if ( ! pattern ) { pattern = 'grunt-available-tasks' ; } pattern = pattern . replace ( / ^node_modules\/ / , '' ) ; var ret ; if ( grunt . file . expand ( 'node_modules/' + pattern ) . length ) { ret = 'node_modules/' ; } else if ( grunt . file . expand ( '../../node_modules/' + pattern ) . length ) { ret = '../../node_modules/' ; } else if ( grunt . file . expand ( 'node_modules/chronicles_of_grunt/node_modules/' + pattern ) . length ) { ret = 'node_modules/chronicles_of_grunt/node_modules/' ; } else { grunt . fail . fatal ( "Cannot find module path for " + pattern ) ; } return ret ; }
Find the path prefix to the node_modules containing needed utilities.
Find the path prefix to the node_modules containing needed utilities .