dev/build/tasks/build.library.module.js
function prepareCssModulesInfo(docDom) {
        var cssModule = { name: '' },
            cssModulesInfo = [];
        $(docDom).find('link[rel="stylesheet"]')
            .filter(function () {
                if (grunt.config.get('lib_kind_fileter_enable')) {
                    var type = path.join(grunt.config.get('lib_kind'), grunt.config.get('stylesheets'));
                    var regexp = new RegExp('^' + type + '\/', 'i');
                    return $(this).attr('href').match(regexp) ? true : false;
                } else {
                    return true;
                }
            })
            .each(function () {
                var href = $(this).attr('href');
                var name = href.slice(href.lastIndexOf('/') + 1, href.length).replace(/\.css$/i, '');
                cssModule = {
                    name: name,
                    version: $(this).attr('data-version'),
                };
                cssModulesInfo.push(cssModule);
            });
        // set lib_css_modules_info
        grunt.config.set('lib_css_modules_info', cssModulesInfo);
    }
function prepareCssModulesInfo(docDom) {
        var cssModule = { name: '' },
            cssModulesInfo = [];
        $(docDom).find('link[rel="stylesheet"]')
            .filter(function () {
                if (grunt.config.get('lib_kind_fileter_enable')) {
                    var type = path.join(grunt.config.get('lib_kind'), grunt.config.get('stylesheets'));
                    var regexp = new RegExp('^' + type + '\/', 'i');
                    return $(this).attr('href').match(regexp) ? true : false;
                } else {
                    return true;
                }
            })
            .each(function () {
                var href = $(this).attr('href');
                var name = href.slice(href.lastIndexOf('/') + 1, href.length).replace(/\.css$/i, '');
                cssModule = {
                    name: name,
                    version: $(this).attr('data-version'),
                };
                cssModulesInfo.push(cssModule);
            });
        // set lib_css_modules_info
        grunt.config.set('lib_css_modules_info', cssModulesInfo);
    }
function prepareCssModulesInfo ( docDom ) { var cssModule = { name : '' } , cssModulesInfo = [ ] ; $ ( docDom ) . find ( 'link[rel="stylesheet"]' ) . filter ( function ( ) { if ( grunt . config . get ( 'lib_kind_fileter_enable' ) ) { var type = path . join ( grunt . config . get ( 'lib_kind' ) , grunt . config . get ( 'stylesheets' ) ) ; var regexp = new RegExp ( '^' + type + '\/' , 'i' ) ; return $ ( this ) . attr ( 'href' ) . match ( regexp ) ? true : false ; } else { return true ; } } ) . each ( function ( ) { var href = $ ( this ) . attr ( 'href' ) ; var name = href . slice ( href . lastIndexOf ( '/' ) + 1 , href . length ) . replace ( / \.css$ / i , '' ) ; cssModule = { name : name , version : $ ( this ) . attr ( 'data-version' ) , } ; cssModulesInfo . push ( cssModule ) ; } ) ; // set lib_css_modules_info grunt . config . set ( 'lib_css_modules_info' , cssModulesInfo ) ; }
Helper API ! extract css libraries info.
Helper API ! extract css libraries info .