tasks/lib/reader.js
function addProperty(sourceData, propertiesGroups, filePath) {

        var group = propertiesUtils.getGroup(sourceData[2], propertiesGroups),
            propertyName,
            data,
            propertyDefinitionWithoutObjectName;

        if (!group) {
            grunt.log.error('Object ' + sourceData[2] + ' without init file');
            return;
        }

        grunt.verbose.ok(sourceData[2]);

        // generate property data
        propertyDefinitionWithoutObjectName = sourceData[2].replace(group.pattern, '').replace(/^\./, '');
        propertyName = propertyDefinitionWithoutObjectName.replace(/^prototype\./i, '');
        data = {
            name:     propertyName,
            source:   sourceData[3].replace(/(^[\r\n\s]+|[\r\n\s;]+$)/g, ''),
            comment:  sourceData[1] || '',
            type:     propertiesUtils.isFunction(sourceData[3]) ? 'function' : 'object',
            isPublic: propertiesUtils.isPublic(propertyName),
            isFromPrototype: propertiesUtils.isFromPrototype(propertyDefinitionWithoutObjectName),
            filePath: filePath
        };

        // add property data to prototype or inline array
        group[(data.isFromPrototype ? 'prototypeProperties' : 'inlineProperties')].push(data);
    }
function addProperty(sourceData, propertiesGroups, filePath) {

        var group = propertiesUtils.getGroup(sourceData[2], propertiesGroups),
            propertyName,
            data,
            propertyDefinitionWithoutObjectName;

        if (!group) {
            grunt.log.error('Object ' + sourceData[2] + ' without init file');
            return;
        }

        grunt.verbose.ok(sourceData[2]);

        // generate property data
        propertyDefinitionWithoutObjectName = sourceData[2].replace(group.pattern, '').replace(/^\./, '');
        propertyName = propertyDefinitionWithoutObjectName.replace(/^prototype\./i, '');
        data = {
            name:     propertyName,
            source:   sourceData[3].replace(/(^[\r\n\s]+|[\r\n\s;]+$)/g, ''),
            comment:  sourceData[1] || '',
            type:     propertiesUtils.isFunction(sourceData[3]) ? 'function' : 'object',
            isPublic: propertiesUtils.isPublic(propertyName),
            isFromPrototype: propertiesUtils.isFromPrototype(propertyDefinitionWithoutObjectName),
            filePath: filePath
        };

        // add property data to prototype or inline array
        group[(data.isFromPrototype ? 'prototypeProperties' : 'inlineProperties')].push(data);
    }
function addProperty ( sourceData , propertiesGroups , filePath ) { var group = propertiesUtils . getGroup ( sourceData [ 2 ] , propertiesGroups ) , propertyName , data , propertyDefinitionWithoutObjectName ; if ( ! group ) { grunt . log . error ( 'Object ' + sourceData [ 2 ] + ' without init file' ) ; return ; } grunt . verbose . ok ( sourceData [ 2 ] ) ; // generate property data propertyDefinitionWithoutObjectName = sourceData [ 2 ] . replace ( group . pattern , '' ) . replace ( / ^\. / , '' ) ; propertyName = propertyDefinitionWithoutObjectName . replace ( / ^prototype\. / i , '' ) ; data = { name : propertyName , source : sourceData [ 3 ] . replace ( / (^[\r\n\s]+|[\r\n\s;]+$) / g , '' ) , comment : sourceData [ 1 ] || '' , type : propertiesUtils . isFunction ( sourceData [ 3 ] ) ? 'function' : 'object' , isPublic : propertiesUtils . isPublic ( propertyName ) , isFromPrototype : propertiesUtils . isFromPrototype ( propertyDefinitionWithoutObjectName ) , filePath : filePath } ; // add property data to prototype or inline array group [ ( data . isFromPrototype ? 'prototypeProperties' : 'inlineProperties' ) ] . push ( data ) ; }
Add property data to their properties group
@param sourceData {String}
@param propertiesGroups [{Object}]
@param filePath {String}
@returns {Object}
Add property data to their properties group