index.js
function(directive) {

		    		var filename = directive.path 
		    			? directive.path.currentFileInfo.filename
		    			: directive.currentFileInfo.filename;
		    		var val, node, nodeTmp = buildNodeObject(filename, directive.index);

		    		if(!directive.path) {
			    		if(directive.features) {
			    			val = getObject(directive.features, true).stringValue;
			    		}
			    		else {
							val = getObject(directive.value, true).stringValue;
			    		}
			    	}
			    	else {
			    		val = directive.path.quote + directive.path.value + directive.path.quote;
			    	}

		    		node = {
		    			type: ""
		    		};

		    		if(directive.type === 'Media') {
		    			node.name = 'media';
		    		}
		    		else if(directive.type === 'Import') {
		    			node.name = 'import';
		    		}
		    		else {
		    			// Remove "@" for PostCSS
		    			node.name = directive.name.replace('@','');
		    		}

		    		node.source = nodeTmp.source;
		    		node.params = val;
		    		
		    		var atrule = postcss.atRule(node);

		    		if(directive.rules) {
		    			atrule.nodes = [];
		    			processRules(atrule, directive.rules);
		    		}
		    		return atrule;
		    	}
function(directive) {

		    		var filename = directive.path 
		    			? directive.path.currentFileInfo.filename
		    			: directive.currentFileInfo.filename;
		    		var val, node, nodeTmp = buildNodeObject(filename, directive.index);

		    		if(!directive.path) {
			    		if(directive.features) {
			    			val = getObject(directive.features, true).stringValue;
			    		}
			    		else {
							val = getObject(directive.value, true).stringValue;
			    		}
			    	}
			    	else {
			    		val = directive.path.quote + directive.path.value + directive.path.quote;
			    	}

		    		node = {
		    			type: ""
		    		};

		    		if(directive.type === 'Media') {
		    			node.name = 'media';
		    		}
		    		else if(directive.type === 'Import') {
		    			node.name = 'import';
		    		}
		    		else {
		    			// Remove "@" for PostCSS
		    			node.name = directive.name.replace('@','');
		    		}

		    		node.source = nodeTmp.source;
		    		node.params = val;
		    		
		    		var atrule = postcss.atRule(node);

		    		if(directive.rules) {
		    			atrule.nodes = [];
		    			processRules(atrule, directive.rules);
		    		}
		    		return atrule;
		    	}
function ( directive ) { var filename = directive . path ? directive . path . currentFileInfo . filename : directive . currentFileInfo . filename ; var val , node , nodeTmp = buildNodeObject ( filename , directive . index ) ; if ( ! directive . path ) { if ( directive . features ) { val = getObject ( directive . features , true ) . stringValue ; } else { val = getObject ( directive . value , true ) . stringValue ; } } else { val = directive . path . quote + directive . path . value + directive . path . quote ; } node = { type : "" } ; if ( directive . type === 'Media' ) { node . name = 'media' ; } else if ( directive . type === 'Import' ) { node . name = 'import' ; } else { // Remove "@" for PostCSS node . name = directive . name . replace ( '@' , '' ) ; } node . source = nodeTmp . source ; node . params = val ; var atrule = postcss . atRule ( node ) ; if ( directive . rules ) { atrule . nodes = [ ] ; processRules ( atrule , directive . rules ) ; } return atrule ; }
PostCSS "at-rule"
PostCSS at - rule