index.js
function joinParts(entrances) {

        var parts = [];
        parts.push(Buffer(content.substring(0, matches.index)));
        parts.push(Buffer('styles: [`'));

        for (var i=0; i<entrances.length; i++) {
            parts.push(Buffer(entrances[i].replace(/\n/g, '')));
            if (i < entrances.length - 1) {
                parts.push(Buffer('`, `'));
            }
        }
        parts.push(Buffer('`]'));
        parts.push(Buffer(content.substr(matches.index + matches[0].length)));
        return Buffer.concat(parts);
    }
function joinParts(entrances) {

        var parts = [];
        parts.push(Buffer(content.substring(0, matches.index)));
        parts.push(Buffer('styles: [`'));

        for (var i=0; i<entrances.length; i++) {
            parts.push(Buffer(entrances[i].replace(/\n/g, '')));
            if (i < entrances.length - 1) {
                parts.push(Buffer('`, `'));
            }
        }
        parts.push(Buffer('`]'));
        parts.push(Buffer(content.substr(matches.index + matches[0].length)));
        return Buffer.concat(parts);
    }
function joinParts ( entrances ) { var parts = [ ] ; parts . push ( Buffer ( content . substring ( 0 , matches . index ) ) ) ; parts . push ( Buffer ( 'styles: [`' ) ) ; for ( var i = 0 ; i < entrances . length ; i ++ ) { parts . push ( Buffer ( entrances [ i ] . replace ( / \n / g , '' ) ) ) ; if ( i < entrances . length - 1 ) { parts . push ( Buffer ( '`, `' ) ) ; } } parts . push ( Buffer ( '`]' ) ) ; parts . push ( Buffer ( content . substr ( matches . index + matches [ 0 ] . length ) ) ) ; return Buffer . concat ( parts ) ; }
Writes the new css strings to the file buffer
Writes the new css strings to the file buffer